Home  >  Forum  >  Hibernate
Post New Query

Hibernate Exception:Illegal use of @FilterJoinTable on an association


joined on
April 01,2014
Asked on February 22,2015
Hi All,

I am  using @FilterJoinTable in my hibernate application to filter collection load as below.

@OneToMany
@JoinColumn(name="stdId")
@FilterJoinTable(name="stdMinId", condition=":minId >= stdId")
private Set<Students> students;

and getting exception as below. How to correct it.

Caused by: org.hibernate.AnnotationException: Illegal use of @FilterJoinTable on an association without join table
at org.hibernate.cfg.annotations.CollectionBinder.bindFilters(CollectionBinder.java:918)
at org.hibernate.cfg.annotations.CollectionBinder.bindOneToManySecondPass(CollectionBinder.java:863)
at org.hibernate.cfg.annotations.CollectionBinder.bindStarToManySecondPass(CollectionBinder.java:779)
at org.hibernate.cfg.annotations.CollectionBinder$1.secondPass(CollectionBinder.java:728)
at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:70)
at org.hibernate.cfg.Configuration.originalSecondPassCompile(Configuration.java:1697)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1426)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1846)



joined on
October 10,2013
Replied on February 22,2015

@FilterJoinTable is used with @JoinTable annotation in hibernate. Follow the link as below.

Write Answer



Sitewide-Feb4of4234x60





Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us