That is very unfortunate. Not only does this force me to keep separate mapping files for SQL and XML mapping, I also have to copy/ paste the common field descriptors over every table in the database. I am pleased to hear about the upcoming release, however. Will the syntax be similar to polymorphism in XML binding?

regards,

Henk van Voorthuijsen

Henk,

our current implementation of polymorphism only supports the tabel per class mapping as stated by Werner. Having said that we intend to improve that in the future to also support mapping per concrete class (what you wanted) and mapping per class hierarchy (all goes into one table).

It's also important for you to know that the polymorphism support is quite new and not included in 0.9.7 release. If you like to use that feature you will need to work with a CVS snapshoot until we release 0.9.9 within a 2 week timeframe.

Ralf


Werner Guttmann schrieb:

Henk,
I think there's no way you can map the classes as layed out by you to your table setup. Given that I have recently added support for polymorphism, the only way to go about this decently is a setup where you have three tables, one for Persistent classes, one for Persons and one for Addresses, wich all common fields going into Persistent.
Werner
-----Ursprüngliche Nachricht-----
Von: Henk van Voorthuijsen [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 08. August 2005 15:45
An: [email protected]
Betreff: [castor-user] [JDO] How to handle subclassing to common fields? Given the following set of classes (assume the appropriate getter/ setter methods):
abstract class Persistent
{
     String _entryName;
     Date _entryDate
}
class Person extends Persistent
{
     String personId
     String _firstName;
     String _lastName;
}
class Address extends Persistent
{
   String addressId
     String _city;
     String _street;
}
and the following tables:
Person
{
     personid
     entryname
     entrydate
     firstname
     lastname
}
  Address
{
     addrid
     entryname
     entrydate
     city
     street
}
How do I set up a mapping without having to specify the common fields for both classes?
-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------
-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------


-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------





-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to