You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I call getUser() on an entity that not inserted yet, it will throw DaoException: Entity is detached from DAO context instead of null. Is that normal?.
User Class:
public class User {
@Id
private Long id;
// rest code
}
Note Class:
// Annotation
public class Note {
@Id
private Long id;
private Long userId;
@ToOne(joinProperty = "userId")
private User user;
// rest code
}
Reproduce step:
val note = Note()
assertThat(entity?.user, IsNull()) // This throws error instead of null
// Insert code
The text was updated successfully, but these errors were encountered:
When I call
getUser()
on an entity that not inserted yet, it will throwDaoException: Entity is detached from DAO context
instead of null. Is that normal?.User Class:
Note Class:
Reproduce step:
The text was updated successfully, but these errors were encountered: