Joined: Wed Aug 15, 2012 8:41 am Posts: 3
|
I am trying to upgrade to hibernate 5.2.7 from hibernate 4.3. I am using xml mapping files. My sqlserver and db2 are working fine, but both oracle and postgresql fail trying to read table hibernate_sequence.
Here is a sample mapping for an id:
<id name="cslogicalDeviceId" type="java.lang.Long"> <column name="CSLogicalDeviceID" /> <generator class="native"> <param name="sequence">CSLOGICALDEVICE_ID_SEQ</param> </generator> </id>
I first tried to get around this by adding the following to my config file: <property name="use_new_id_generator_mappings">false</property>
That did not work. I then tried to programmatically change the setting like this:
MetadataBuilder metadataBuilder = new MetadataSources(serviceRegistryCommon).getMetadataBuilder(); metadataBuilder.enableNewIdentifierGeneratorSupport(false); factoryCommon = metadataBuilder.build().buildSessionFactory();
That also failed.
Any ideas on how I can get hibernate to use the named sequence?
Thanks
|
|