Originally posted by Ilya Elkind:
I have another dillema.
I want to add a set of objects inside the object.
So for every user, there should be a set of "friends"
This is what i would normally do if i was working with collections.
Now this would normally work, if this was a 1 to Many mapping across another class, but this doesnt work becuase my setFriends method has to take a set of UserEnts.
Is there a way to set this collection set or should i not even bother with the add/remove methods?
Actually, you want what you have.
The one thing I am trying to teach in my posts, is that keep doing OO as you do OO, forget about the database. And when working in the database forget about the OO model. Then after you have the best design in the particular paradigm, then worry about mapping them with Hibernate.
Hibernate has solutions for all mapping needs, so there is always a solution based on what OO and database model you chose.
Mark