abalfazl hossein wrote:...still can not understadn how strategy pattern works...
Don Kiddick wrote:I'm confused whether this is a domain model (where our domain is the ui) or a presentation model (in which case we don't really have a domain model).
Arun Prasath wrote:Hello All,
I am using EJB/JPA (Hibernate) in a project. I need to lock the record and show it to the user on (UI) page. I should not realase the lock until the user updates the record or cancel the action, such a way that same record should not be updated by other user ( probably by throwing optimistic locking exception when such attempts made). ..
Could you please give some efficient solution.?
Mark Spritzler wrote:This exception occurs when you don't have all your data in your objects, then leave the confines of a Session object.
So if I lazy load a Collection say Parent has a Collection of Children. If Children is lazy loaded and I call getChildren in the Parent object, and there is no Session open, then yoiu have no way to load that data, so it throws that exception. Either eager load the data when you query, or call the code within a Session.
Perry Terrance wrote:Actually this relationship is not circular/cyclic - since there is no direct-connection between STUDENT and SCHOOL OFFICIALS.
I will need to stick with this design though because it was designated that a table of just SCHOOL ACTIVITIES will be needed.
In terms of coding JPA2 though, it should still work right to do the Insert coding as I mentioned above?
Hendra Kurniawan wrote:I'm still confused with the concept DI. In a nutshell, I perceive that DI is basically only aims to loosen coupling. Some help here? thanks