perhaps the topic name was not the best, but I think its a fair question.
So far, only strategy to avoid the entity which holds the collection to get updated is to
resort to deal with id alone, a not very object-oriented way to go, so instead of
retrieving the ticket.course object fetch just the id:
Integer idCourse = (Integer)entityManager
| .createQuery("select t.course.id from Ticket t where
t.code=#{register.code}")
| .getSingleResult();
But I don't know if dealing with IDs is the proper way to go with respect to ORM
techniques.
At the same time this makes think of another issue: the implementation of master-detail
editions, which at first, for the neophyte like me, feels natural to handle using nested
conversations and sharing full objects but the preferred way to go is using entityhome and
its passing-just-the-id technique, again a not very OO-ish way IMHO.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112762#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...