I have a POJO with the following annotations on a field:
Code:
@OneToOne(cascade=CascadeType.ALL)
@JoinColumn(name="OneToOneID")
protected SampleBean1 oneToOne;
Note that the POJO is a SampleBean1, so it's basically pointing to the same class. When I get the ClassMetadata and get the oneToOne property's type and cast it to EntityType, EntityType.isOneToOne() returns false. Am I doing something wrong? It is actually quite important for my library to know a OneToOne from a ManyToOne. Is that information stored elsewhere? Hopefully I don't have to use reflection, or worse, look at the SQL for a unique constraint.
More details at
http://stackoverflow.com/questions/1381 ... ytoonetype. Sorry to double post on two forums. It's quite an urgent issue for me.
Any help is appreciated.