Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Hello,
I want to use the primary key of an entity as primary key, like :
Code:
@Id(generate = GeneratorType.NONE)
@NotNull
@OneToOne(fetch = FetchType.LAZY, targetEntity = Company.class)
@JoinColumn(name = "details_id", nullable = false, unique = true)
public ICompany getCompany() throws RemoteException {
return company;
}
public void setCompany(ICompany o) throws RemoteException {
company = o;
}
but with this code, hibernate use the 'ICompany' value and not it's primary key.