[
http://opensource.atlassian.com/projects/hibernate/browse/ANN-527?page=co...
]
Börcsök József commented on ANN-527:
------------------------------------
I have a similar usecase: my domain model contains events and members. Events can be Camp
or Conference (so event is an abstract entity, Camp and Conference contains specific
properties too)
Members have attributes like name, email, ... and CampMember and ConferenceMember also
have specific properties.
So my entity classes should be (using generics):
event entities:
Event, Camp extends Event, Conference extends Event
member entities
Member<T extends Event> (0..*) ---------<> (1..1)
T
CampMember extends Member<Camp>
ConferenceMember extends Member<Conference>
on deploy I've got the following exception:
Property Member.event has an unbound type and no explicit target entity. Resolve this
Generic usage issue or set an explicit target attribute (eg @OneToMany(target=) or use an
explicit @Type
@OneToMany annotation has no target but targetEntity property. I've tried the
targetEntity property and the @Type annotation but neither has worked :(
reference a target entity (in a collection) by entity name
----------------------------------------------------------
Key: ANN-527
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-527
Project: Hibernate Annotations
Type: New Feature
Components: binder
Reporter: Armin Haaf
It is only possible to reference a targetEntity by class.
@ManyToMany(targetEntity = TestImpl.class)
List<Test> myList;
This makes it impossible to exchange TestImpl.class implemention by another implemention
by the mappings definition.
It would be helpful to reference a targetEntity by name.
@ManyToMany(targetEntityName = "Test")
This would help a lot to implement moduls and frameworks.
Another way to support this would be to search for a implementation of the collection
elements (which are typically Interfaces) in the mapped entities
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira