Exception 1:not-null property references a null or transient value
WORKAROUND: Set the "one" side of the "A-to-many" relationship to false Not-null
(Reference: http://www.thearcmind.com/confluence/pages/viewpage.action?pageId=212)
Exception 2:org.hibernate.transientobjectexception:object references an unsaved transient instance
Workaround: cascade= "Save-update,persist"
(Reference: http://www.laliluna.de/254.html)
Exception 3:org.hibernate.queryexception:could not resolve property
Workaround: "From category category where Category.userid =: userid" modified to "from category category Whereuserid =: userid" or "from Cate Gory category where Category.user.id =: UserID "
(Reference: http://www.laliluna.de/277.html)
Exception 4:could not initialize Proxy-the owning Session was closed
Workaround: Set lazy to False
(Reference: http://forum.springframework.org/showthread.PHP?t=27993)
Org.hibernate.TransientObjectException:object references an unsaved transient instance-save the transient instance befo Re Flushing:
This is mostly encountered when the Manytoone cascade operation, such as new, has been saved into a new object (that is, not a persistent state) until it is saved.
The solution is to isolate the object before saving or updating it (this is a persistent state).
The workaround is to set the Many-to-one cascade to: Cascade= "Save-update,persist"