Re: Modeling heterogeneous entities (inheritance issue)

2008-07-10 Thread Mike Kienenberger
As Malcolm said, I wouldn't model this with inheritance. I've done something similar, probably using what Malcolm called Composition Design. I used a LOG table to track field-level changes in my application: ColumnName Type Name SizeScale NullableAutoIncrement Type

Modeling heterogeneous entities (inheritance issue)

2008-07-10 Thread ihawk ihawker
Thank you for the answer. As I understand I follow Composition Design, but still have problems with implementing inheritance... It seems my first message was badly formatted. So I'll copy it in this message again: - Hello! I am trying to model a list of heterogeneous entities b

RE: Autogenerated keys issues

2008-07-10 Thread Garcia Corral, Josep
I had some similar problem with Oracle. It had to do with cached sequence numbers. The solution was to specify, in the modeler, Cached PK Size as 1. Hope this helps. Josep -Mensaje original- De: bobsponge [mailto:[EMAIL PROTECTED] Enviado el: jueves, 10 de julio de 2008 15:37 Para: user@c

Autogenerated keys issues

2008-07-10 Thread bobsponge
Hello, I'm using cayenne v2.0.4 with h2 as database engine. All table indexes are auto-generated with a auto_pk_support table. Table Indexes generation usually works but some times I get an error like this org.apache.cayenne.CayenneRuntimeException: [v.2.0.4 October 12 2007] Commit Exception, or

Re: Modeling heterogeneous entities (inheritance issue)

2008-07-10 Thread Malcolm Edgar
For this type of design a couple of alternatives are: #1 - Composition Design Follow the object composition pattern, i.e. an object has a, instead of an object is a. So your base entity could maintain a type column and then foreign key relationships to other tables, dependent upon what type of en

Modeling heterogeneous entities (inheritance issue)

2008-07-10 Thread ihawk ihawker
Hello! I am trying to model a list of heterogeneous entities by having a ListItem table where the list item entity is able to point to an arbitrary entity (Person, Computer, URL, Movie, etc). I don't want to use single-table inheritance natively supported by Cayenne because of big database si