Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Hibernate 3.2.1.ga
Mapping documents:
Code:
<class>
...
<filter name="filter-deleted"/>
</class>
<filter-def name="filter-deleted"
condition="row_status != (SELECT nd.id FROM nom_dictionary nd WHERE nd.value = 'STATUS_DELETED')"/>
Full stack trace of any exception that occurs:Code:
java.lang.NullPointerException
org.hibernate.cfg.HbmBinder.parseFilter(HbmBinder.java:2931)
org.hibernate.cfg.HbmBinder.bindCollection(HbmBinder.java:1462)
org.hibernate.cfg.HbmBinder$2.create(HbmBinder.java:2757)
org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2050)
org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2031)
org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:359)
org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:273)
org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:144)
org.hibernate.cfg.Configuration.add(Configuration.java:669)
org.hibernate.cfg.Configuration.addInputStream(Configuration.java:504)
org.hibernate.cfg.Configuration.addResource(Configuration.java:566)
org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1584)
org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1552)
org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1531)
org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1505)
org.hibernate.cfg.Configuration.configure(Configuration.java:1425)
I noticed the following note in org.hibernate.cfg.HbmBinder:2924
Code:
//TODO: bad implementation, cos it depends upon ordering of mapping doc
// fixing this requires that Collection/PersistentClass gain access
// to the Mappings reference from Configuration (or the filterDefinitions
// map directly) sometime during Configuration.buildSessionFactory
// (after all the types/filter-defs are known and before building
// persisters).
How can I work around this?
Many thanks!