This is something I've wanted for months:
class name=Person
id name=name/
one-to-one name=address cascade=all constrained=false
formulaname/formula
formula'HOME'/formula
/one-to-one
one-to-one name=mailingAddress constrained=false
formulaname/formula
formula'MAILING'/formula
/one-to-one
/class
class name=Address batch-size=2
check=addressType in ('MAILING', 'HOME', 'BUSINESS')
composite-id
key-many-to-one name=person
column=personName/
key-property name=type
column=addressType/
/composite-id
property name=street/
property name=state/
property name=zip/
/class
All made possible by the aptly named SpecialOneToOneType.
But that's not all!
So, for a long time its been possible to map an association with one to
one multiplicity using many-to-one. Well, for the sake of symmetry, it
is now possible to use one-to-one to map an association with many to
one multiplicity. Isn't that great, huh? See how flexible our product
is! Who needs expert groups and specifications when you have us open
source developers to design such intuitive syntax?
hmmm
--
Gavin King
+61 410 534 454
+1 404 822 8349
callto://gavinking
Hibernate
[EMAIL PROTECTED]
http://hibernate.org
JBoss Inc
[EMAIL PROTECTED]
http://jboss.com
---
SF email is sponsored by - The IT Product Guide
Read honest candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel