File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Hibernate AssertionFailure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate AssertionFailure" Watch "Hibernate AssertionFailure" New topic
Author

Hibernate AssertionFailure

ruben depuben
Greenhorn

Joined: Feb 19, 2009
Posts: 6
Hello,

I am running into the following Hibernate exception when trying to get Sections with a certain name from Hibernate.

org.hibernate.AssertionFailure: null id in model.Section entry (don't flush the Session after an exception occurs)

at dao.hibernate.SectionDAOHibernate.isUniqueNameInsert(SectionDAOHibernate.java:76)



Line 76 is the line where I try to get the Sections with q.list().



Any clue as to what may be wrong here? Can this be caused by an empty id in the database or something? I generate the indexes with the code below and this works fine for my other entities...

@Id @GeneratedValue
@Column(name="SECTION_ID")
public Long getId() {
return id;
}

Best, Ruben



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate AssertionFailure