Solution for : Why hibernate does not insert into child table ?

If Hibernate does not insert element in child table , The reason is because the mapping does not cascade the persist operation. Example : The solution is : Cascade operations are extremely useful, but be mindful of their potential side effects, particularly if you modify Ticket which you don’t intend for an operation to be […]

En Lire Plus

(SOLVED) “object references an unsaved transient instance”

How to fix the Hibernate “object references an unsaved transient instance – save the transient instance before flushing” error ! SOLUTION : You should include on your collection mapping: (if using xml) or (if using annotations) This happens because you have a collection in your entity, and that collection has one or more items which […]

En Lire Plus

(SOLVED) No Session found for current thread

Request processing failed; nested exception is org.hibernate.HibernateException: No Session found for current thread Solution : If you have this exception using Hibernate , that mean that you forgot the annotation @Transaction in your service implement class function that caused this Exception.

En Lire Plus