openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Uri Boness <ubon...@gmail.com>
Subject RE: sequence per entity
Date Thu, 16 Aug 2007 18:47:20 GMT
Gene, you got it just right. In addition, the class-table sequence uses 
a table to hold the sequences. With postgresql (or any database which 
supports sequence objects) I believe it is more natural to have a 
sequence object rather than a table. I took your advice and created a 
custom ClassTableNativeJDBCSeq class that uses a sequence per entity 
table (not entity class) I think it would be great of openjpa would give 
this support out-of-the-box (at least then it would probably have a 
short alias like "class-native" and I wouldn't need to define the fully 
qualified class name as the sequence name :-)). Furthermore, I was 
wondering how exactly does the class-table sequence work? I saw it uses 
the entity class name (or alias) as the key for the sequence. How does 
it behave with single table inheritance? I cannot imagine you'll have 
multiple sequences for the same table. It makes more sense to me to have 
a sequence per table.

cheers,
Uri

Mime
View raw message