I have a table/class User and Message. One User can have many messages. How do I model the Java class for Message; should it have a property of type User, or just a String for the username which is the key in this relationship?
When using Hibernate to generate the classes, it gave the Message class a User property. Does that mean it's the right way?
I find it problematic when creating messages to also give it a User instance, because I can't seem to do that in a Spring webflow that I'm using (I'm only passing the username from the view).