This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Currently, when you create a Persistence Unit, you can choose several persistence providers, including "Hibernate (JPA 1.0)", which is included in the IDE by default. However, Hibernate is now a JPA 2.0 implementation, so the JPA 2.0 option should be available too. Could this be done, and what are the obstacles? This will be also important if we support Java EE 6 development with JBoss 6 (see bug 185713): JBoss uses Hibernate as its default JPA implementation.
Current realization should support recognizing new library created by user as hibernate jpa2.0 provider and usage of the library/hibernate(jpa2.0) in jpa applications. There are several subissues -support hibernate jpa2.0 provider selection even if no library is created, may be if provider with specific name/type is supported/recognized in several versions it should be available in version selection combobox instead of several items in providers combobox. -recognize servers with hibernate jpa2.0 -upgrade bundled one to hibernate jap2.0 but it may affect other parts of hibernate support.
We could bundle both of them, rigth? Hibernate(JPA1) and Hibernate(JPA2)
we can but it may not be good, each additional library increase "nb java se" distribution size.
Would it be possible to just bundle the latest one (currently 3.6.0.CR2) and use it as both JPA 1.0 and JPA 2.0 implementation, as we do with TopLink? That way, we would have the jar files just once, but we could have both Hibernate (JPA 1.) and Hibernate (JPA 2.0) persistence providers.
I'm looking to enable hibernate (jpa 2.0) selection for server based projects without having hibernate bundled for now. It seems to work correct, create proper persistence.xml and add or not add proper library but. There is a side effects in visual editor as for gf3, there are jpa2.0 api on classpath and provider class is the same for jpa1.0 and jpa2.0 hibernate libraries, it's hard to determine what version to show in dropdown if both are supported, I'm looking for a way to handle it now.
I may need to change version detection from latest possible one to more probable one, may be it's possible to suppose user would like to use persistence 1.0 with hibernate jpa1.0 providers and not with hibernate jpa 2.0 providers even it's possible to use with hibernate jpa2.0, and if use hibernate jpa2.0 then use jpa2.0 itself and not alder one even it's possible to use older one. Other cases are corner one.
Integrated into 'main-golden', will be available in build *201010260000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/6e636de4c7eb User: Sergey B. Petrov <sj-nb@netbeans.org> Log: fix #190800 add hibernate 2.0 as supported provider to all projects even if now library was created
Petr, is tis enhancement about "offer" hibernate jpa2.0 provider or about bundled library also?
This is about the provider only. The bundled library is a separate thing (if we decide to do it at all).
Integrated into 'main-golden', will be available in build *201011050000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/0d78ce2300b5 User: Sergey B. Petrov <sj-nb@netbeans.org> Log: fix #190800 changed corresponding tests, as provider class is the same for both hibernate versions result is dependent on version logic
This feature is at least present in 7.4