
|
If you were logged in you would be able to see more operations.
|
|
|
|
FilterDefinitions defined by FilterDefinitionFactoryBeans should be added to the Hibernate configuration before other configuration files (*.hbm.xml and *.cfg.xml) are added to prevent null pointer exceptions in org.hibernate.cfg.HbmBinder.parseFilter (line 2895)
Such null pointer exceptions occur only when the filters defined in the <class> mappings rely on the <filter-def/> for the condition, i.e. if the filter-def has a condition defined and the filter elements in the class mappings do not, then a null pointer exception will occur.
This is apparently a known problem from the Hibernate team. From HbmBinder.parseFilter line 2888 (3.2.cr2):
//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).
Not reporting to Hibernate team -- this implies there is some partial ordering of additions to the Hibernate configuration, and Spring will apparently be responsible for knowing what that ordering is.
|
|
Description
|
FilterDefinitions defined by FilterDefinitionFactoryBeans should be added to the Hibernate configuration before other configuration files (*.hbm.xml and *.cfg.xml) are added to prevent null pointer exceptions in org.hibernate.cfg.HbmBinder.parseFilter (line 2895)
Such null pointer exceptions occur only when the filters defined in the <class> mappings rely on the <filter-def/> for the condition, i.e. if the filter-def has a condition defined and the filter elements in the class mappings do not, then a null pointer exception will occur.
This is apparently a known problem from the Hibernate team. From HbmBinder.parseFilter line 2888 (3.2.cr2):
//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).
Not reporting to Hibernate team -- this implies there is some partial ordering of additions to the Hibernate configuration, and Spring will apparently be responsible for knowing what that ordering is. |
Show » |
|
Didn't see any infrastructure for actually running hibernate tests (with hsqldb, for example) in the Spring /test directory. Any suggestions?
If desired I can submit a test that I can compile, but won't necessarily work within the Spring build system.