Joined: Wed Dec 28, 2005 1:18 pm Posts: 5
|
As a followup... I have a similar issue with @CollectionOfElements and was hoping you could explain how to use @Type in these situations.
I am using the following:
Hibernate 3.1
Hibernate Annotations 3.1beta7
Hibernate Entity Manager 3.1beta5
@Embedded
public class StreetAddress implements IStreetAddress {
...
}
@Entity
public class SomeEntity {
@CollectionOfElements
@JoinTable( ... )
// Here I have to do something with @Type to indicate that this
// collection should be of StreetAddresses
private List<IStreetAddress> addresses = new ArrayList<IStreetAddress>();
}
My understanding of @Type is that I need to implement an UserType for StreetAddress? Is there a way to leverage the annotations in StreetAddress by just specifying StreetAddress.class? Is there a built-in UserType that will take an @Embedded class and do the right thing?
I appreciate the help. I just need to be pointed in the right direction.
Thanks,
A.J.
|
|