[Hibernate] Be Amazed and Delighted by the Wondrous SpecialOneToOneType

2005-02-10 Thread Gavin King
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


Re: [Hibernate] Be Amazed and Delighted by the Wondrous SpecialOneToOneType

2005-02-10 Thread Christian Bauer
On Feb 10, 2005, at 1:35 PM, Gavin King wrote:
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?
Ugh. I took me about 30 seconds to understand it, weird stuff. I'll 
file this as faking polymorphism a little bit.

--
Christian Bauer
callto://christian-bauer
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