actually, reading the javadocs generated for xdoc's GUID, the GUID appears to be "globally unique" so there should be no conflicts between superclass and subclass having the same id under jboss's horizontal positioning approach.
thanks again for your reply.
At 00:16 02/12/06 -0500, you wrote:
I dont' knwo how it works. If it can generate collisions I don't really see why "GUID" is in the name. I'd use a generator/sequence from the db and make sure all tables use the same generator.david On 2002.12.05 23:36:21 -0500 tek1 wrote: > hi david. > > thank you very much for your reply. > > i was considering using xdoclet's generateGUID() method to generate > random > id's for the entities/records, but this appears to break down in jboss' > horizontal positioning approach, unless in the ejbCreate() method for the > > SUBCLASS, it checks to see if the id generated by generateGUID() exists > in > the PARENT entity/table. > > does this sound correct? > > thanks again. > > > At 23:11 02/12/05 -0500, you wrote: > >At the moment jboss figures the BASE and EXTENDED entity beans are > >unrelated and is happy if they have the same id. I've been trying to > get > >some discussion going about how to support polymorphic entity beans in > >jboss, but so far haven't had much response. > > > >JBoss 4 will be able to map an entity to more than one table, so the > >vertical partitioning (and presumably the typed scheme) will be > possible. > > > >you are pretty much on your own for generateing pk values anyway, so you > >can choose a scheme whereby BASE and EXTENDED don't share numbers. > > > >david jencks > > > > > > > >On 2002.12.05 21:22:01 -0500 tek1 wrote: > > > hi marc! > > > > > > thank you for the clarification. > > > > > > the reason why i asked is because if jboss uses horizontal > partitioning, > > > is > > > it possible for the same id to be used for different objects in > different > > > tables? > > > > > > for example, given the following tables: > > > > > > BASE > > > -oid > > > -name > > > > > > EXTENDED > > > -oid > > > -name > > > -age > > > > > > > > > if in BASE, the following record exists: > > > > > > BASE > > > oid | name > > > ---|----- > > > 1 | marc > > > > > > and we want to add a new record (entity instance having different > data) > > > to > > > EXTENDED, does jboss know not to use an oid of "1" in EXTENDED, since > it > > > already exists in the BASE table? > > > > > > also, how can one protect against outside access of the db (i.e. > using a > > > db > > > management/sql tool) from someone inserting records with the same id > (but > > > > > > different data) into BASE and ENTITY? it seems like this opportunity > for > > > > > > error is prevented with the vertical partitioning approach, but not > with > > > the horizontal partitioning approach. does jboss compensate somehow > for > > > this? > > > > > > thank you again. > > > > > > > > > > > > At 18:28 02/12/05 +0100, you wrote: > > > >Hello, > > > > > > > > > when one entity bean extends another, does the extending entity > > > bean's > > > > > table include all of the fields of its parents in its own table? > > > > I don't know how this is solved within JBoss, but > conceptually > > > you > > > >have three possibilities: > > > > > > > > #1 - typed partitioning > > > > > > > > the sum of all fields are stored in a base table, having an > > > >additional column defining what kind of object it is: base, or > extended. > > > > > > > > for instance > > > > > > > > BASE > > > > String name > > > > > > > > EXTENDED > > > > int age > > > > > > > > would result in the table BASE having > > > > oid INTEGER - object identifier > > > > name VARCHAR > > > > age INTEGER > > > > objType INTEGER (or some kind of IDENTIFIER) > > > > > > > > > > > > #2 - horizontal partitioning > > > > > > > > all fields are repeated in each table for the subclasses. > > > > > > > > this would result in a table EXTENDED with oid, name and > age, > > > and in > > > >a table BASE with oid and name. > > > > > > > > > > > > #3 - vertical partitioning > > > > > > > > only the very fields belonging to the class are stored in > the > > > >corresponding table > > > > > > > > this would result in a table BASE with oid and name, and in > a > > > table > > > >EXTENDED with oid (also referencing BASE(oid)) and age. > > > > > > > > > > > > > when i deployed 2 entity beans, one extending the other, the > > > extending > > > > > bean's db table had all the fields defined of its parents' > table... > > > > then JBoss adopted the horizontal solution... > > > > > > > > > > > > Regards, > > > > > > > > Marc
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
