openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henno Vermeulen <he...@huizemolenaar.nl>
Subject RE: repeatable autogenerate names for key constraints
Date Wed, 24 Apr 2013 09:24:27 GMT
Note that there is a serious bug in the code I included in the answer of my own question. I
am using the BaseClassStrategy also for subclasses which affects what tables are generated
for inheritance! To solve this you should use

			<property name="openjpa.jdbc.MappingDefaults"
				value="nl.hm.olga.core.dao.openjpa.KeyConstraintNamesMappingDefaults(ForeignKeyDeleteAction=restrict,
JoinForeignKeyDeleteAction=restrict, 
				BaseClassStrategy=org.apache.openjpa.jdbc.meta.strats.PrimaryKeyConstraintNameFullClassStrategy)"
/>

But this again results in non-predictable names for primary keys used in subclasses.

Mime
View raw message