It started from
turin42:
i read the spec and the docs
and i've got a hard time explaining the abuse of @OneToMany
is this how it is going to look like in EJB 3.1?
epbernard:
Nothing is specified for such things in EJB3 nor even globally designed
What do you mean by @OneToMany abuse
turin42:
@OneToMany on a collection of strings conflicts with our explanation of
one-to-many _entity_ associations
i think a separate set of annotations would be better
epbernard:
I wanted the spec commity to rename targetEntity by targetElement
turin42:
that would have been a first step
but still, i think the completely different semantics of whats _inside_
that collection deserve different annotations
lifecycle, shared references, identity, etc.
i would reserve *-to-* only for entity associations
thats what we have always done in hibernate
keep in mind that this stuff is the most difficult thing to understand
in ORM
also, we use @Embedded and not @OneToOne
what about a @org.hibernate.annotations.CollectionEmbedded
supporting @JoinTable and @AttributeOverride
But actually,
you can do
@CollectionEmbedded
@Embedded
public Set<Address> getAddresses();
or
@CollectionEmbedded
//no embedded here so address will be stored in its serialized form
public Set<Address> getAddresses();
So I'm not so happy of the @CollectionEmbedded name (the fact that
embedded is inside), WDY all T?
@CollectionElement, @ElementCollection?
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel