-->
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.  [ 5 posts ] 
Author Message
 Post subject: Hibernate Filters
PostPosted: Tue Sep 25, 2007 2:51 pm 
Beginner
Beginner

Joined: Sat Dec 03, 2005 11:12 am
Posts: 27
Hi,

I am using Hibernate version: 3.1.
I have a question regarding hibernate filters

I have a filter on my set and My mapping document looks like this

<set fetch="join" cascade="all" name="definitionVersions">
<cache usage="read-write"/>
<key column="definition_oid"/>
<one-to-many class="gov.osc.vendrep.model.DefinitionVersion"/>
<filter condition=":asOfDate BETWEEN eff_start_date and eff_end_date" name="effectiveDate"/>
</set>

when i try to enable the filter it gives me

org.hibernate.HibernateException: No such filter configured [effectiveDate]


Any help would be appreciated.

Thanks,


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 25, 2007 3:12 pm 
Beginner
Beginner

Joined: Sat Dec 03, 2005 11:12 am
Posts: 27
dont worry guyz. I figured out the problem.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 26, 2007 8:49 am 
Newbie

Joined: Wed Sep 26, 2007 8:25 am
Posts: 3
Using Xdoclate apply the filter to collection(set/Map/List)

Definition of a filter attached to a class or collection

/**
* @hibernate.set cascade="all-delete-orphan" lazy="false" inverse="true"
* @hibernate.collection-key column="ID" update="false" insert="true" not-null="true"
* @hibernate.collection-one-to-many class="className"
* @hibernate.filter name="FilterName" condition=":paramName='Y'"
*
*/
public Set<className> getTieredDatesSet() {

}

Filter parameter definition:
@hibernate.filter-param defination for - bean property(hear TIERED column property)
type -- String or Boolean or Integer which condition u want u can mention that type

/**
* @hibernate.filter-def name="FilterName"
* @hibernate.filter-param name="paramName" type="String" filterdef-name="FilterName"
* @hibernate.property column = "PROPERTYNAME"
*/
public String getProperty() {
return property;
}


If u write in this way that filter create an appropriate *.hbm.xml


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 26, 2007 8:50 am 
Newbie

Joined: Wed Sep 26, 2007 8:25 am
Posts: 3
Using Xdoclate apply the filter to collection(set/Map/List)

Definition of a filter attached to a class or collection

/**
* @hibernate.set cascade="all-delete-orphan" lazy="false" inverse="true"
* @hibernate.collection-key column="ID" update="false" insert="true" not-null="true"
* @hibernate.collection-one-to-many class="className"
* @hibernate.filter name="FilterName" condition=":paramName='Y'"
*
*/
public Set<className> getTieredDatesSet() {

}

Filter parameter definition:
@hibernate.filter-param defination for - bean property
type -- String or Boolean or Integer which condition u want u can mention that type

/**
* @hibernate.filter-def name="FilterName"
* @hibernate.filter-param name="paramName" type="String" filterdef-name="FilterName"
* @hibernate.property column = "PROPERTYNAME"
*/
public String getProperty() {
return property;
}


If u write in this way that filter create an appropriate *.hbm.xml


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 26, 2007 8:55 am 
Newbie

Joined: Wed Sep 26, 2007 8:25 am
Posts: 3
Using Xdoclate apply the filter to collection(set/Map/List)

Definition of a filter attached to a class or collection

/**
* @hibernate.set cascade="all-delete-orphan" lazy="false" inverse="true"
* @hibernate.collection-key column="ID" update="false" insert="true" not-null="true"
* @hibernate.collection-one-to-many class="className"
* @hibernate.filter name="FilterName" condition=":paramName='Y'"
*
*/
public Set<className> getTieredDatesSet() {

}

Filter parameter definition:
@hibernate.filter-param defination for - bean property
type -- String or Boolean or Integer which condition u want u can mention that type

/**
* @hibernate.filter-def name="FilterName"
* @hibernate.filter-param name="paramName" type="String" filterdef-name="FilterName"
* @hibernate.property column = "PROPERTYNAME"
*/
public String getProperty() {
return property;
}


If u write in this way that filter create an appropriate *.hbm.xml


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

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.