> 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
Agreed; it would be nice functionality. Can you create a JIRA issue and attach the file there? Also, you don't need it to ship with OpenJPA for it to have a short alias; you just need to create a ProductDerivation that installs it. Now, this is actually more work than typing the full class name once or twice, but if you're shipping something for others to use, it can be useful. > qualified class name as the sequence name :-)). Furthermore, I was > wondering how exactly does the class-table sequence work? I saw it uses > 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. The class-table sequence would be better named as 'class-hierarchy-table' or something. It's one sequence per least-derived class that has an identity. -Patrick On 8/16/07, Uri Boness <[EMAIL PROTECTED]> wrote: > 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 > -- Patrick Linskey 202 669 5907
