Hi guys, I am using JBoss 4.0.5.GA, PostgreSQL 8
I hope this is not so newbie question, I was an EJB2 developer in the past, and I made the switch to EJB3 with Hibernate, I have an entity defined like this:
Code:
@Entity
@Table(name="USER")
public class User implements Serializable {
private Long id;
private String full_name;
private String username;
private Level level;
[...]
@OneToOne(fetch=FetchType.EAGER,cascade=CascadeType.MERGE)
public Level getLevel() {
return level;
}
public void setLevel(Level level) {
this.level = level;
}
"Level" is another entity, and a table One to One relation at Database.
The problem is that when I retrieve one "User" from the DB the "level" object is not being populated (it is null), even that I set the Fetch Type to Eager.
What am I missing?
Thanks!