Max Rydahl Andersen [http://community.jboss.org/people/maxandersen] created the discussion
"Re: How to add constructors with ID in pojo generation?" To view the discussion, visit: http://community.jboss.org/message/603306#603306 -------------------------------------------------------------- assigned id is when you do not have autogenerated keys. entity.setChild(new ChildEntity(childId)) is rather bad since why do you want to have an incomplete objectgraph? better approach is: entity.setChild(session.load(ChildEntity.class, childId)); That will do the same thing and wont load the childentity unless you try to access methods on it avoiding incomplete objectgraph. -------------------------------------------------------------- Reply to this message by going to Community [http://community.jboss.org/message/603306#603306] Start a new discussion in JBoss Tools at Community [http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]
_______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
