Hibernate versions (from maven):
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.5.ga</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.3.0.ga</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.3.1.ga</version>
</dependency>
JPA
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
</dependency>
Hi
Im having trouble making the following work:
pseudo code:
Code:
?? what should go here? I dont want a seperate table for xyz..
interface xyz{
@ManyToOne
public abstract Other getOther();
}
@entity
class xy implements xy{}
@entity
class yz implements yz{}
@entity
class other{
// can contain both xy and yz
@OneToMany(mappedBy = "other")
List myStuff<xyz>;
}
Can I actually get this to work? I've also tried making xyz as an abstract class, with no luck either.