gravitino icon indicating copy to clipboard operation
gravitino copied to clipboard

[FEATURE] Would consider replacing mybatis with hibernate?

Open melin opened this issue 1 year ago • 5 comments

Describe the feature

Would consider replacing mybatis with hibernate? tob enterprise has a lot of various databases, such as requiring the use of dameng database, mybatis dialect support is weak。 unitycatalog uses hibernate

Motivation

No response

Describe the solution

No response

Additional context

No response

melin avatar Aug 05 '24 02:08 melin

@melin Thanks for your attention. This is a valid point; the community is also going to support additional databases besides MySQL, H2, like PG, Oracle, and so on, and Mybatis, which may not be well-suited for handling multiple dialects.

Would you like to work on this?

yuqi1129 avatar Aug 05 '24 02:08 yuqi1129

Currently, Hibernate is under a GPL license, which is not compatible with the Apache license, so it can't be used in ASF software or, in fact, any Apache licensed software.

justinmclean avatar Aug 05 '24 06:08 justinmclean

unitycatalog is an Apache license. Why can unitycatalog be used? https://github.com/unitycatalog/unitycatalog/?tab=Apache-2.0-1-ov-file#readme

melin avatar Aug 05 '24 07:08 melin

They shouldn't see https://github.com/unitycatalog/unitycatalog/issues/75

justinmclean avatar Aug 05 '24 07:08 justinmclean

EclipseLink can be an alternative

melin avatar Aug 05 '24 10:08 melin

  • We discussed this at https://lists.apache.org/thread/rqmq3t0b31fg3cz7jsm80rzpk18srnts . In an asf project, any logic code that uses the hibernate jar needs to be placed in a separate maven module or gradle module, and the hibernate dependency itself needs to have the optional set to true in the maven module or gradle module.
<dependency>
    <groupId>org.hibernate.orm</groupId>
    <artifactId>hibernate-core</artifactId>
    <version>6.6.1.Final</version>
    <optional>true</optional>
</dependency>
  • Direct replacement of hibernate is not allowed. The logic code related to hibernate can only be an optional module.

linghengqian avatar Nov 03 '24 04:11 linghengqian