-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problems using filters
PostPosted: Thu Nov 30, 2006 1:32 pm 
Newbie

Joined: Fri Sep 15, 2006 10:29 am
Posts: 14
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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.