Hibernate version: 3.1.1
Suppose I have 3 tables, a many-to-many.
USERS: (UID,UNAME,STATE_ID)
STATES: (STATE_ID,SNAME)
USER_STATES: (UID,STATE_ID)
My User object HAS a list/set of states, but my States object DOES NOT have a list/set of users (as i dont think that's usually queried that way). So how should I map this case? Its not many-to-many on the object side because States has no list of users. Can someone show me a mapping for this case? Or is the best practice to add a list of Users to the State object? If I was using Ibatis, I'd just map what I need, but I'm sorry if this is a simple question, its just that Hibernate has its own way of working that's not obvious to a new user. Thanks very much help.
|