Page 1 of 1

"where" vs "filter" attributes in mappings

Posted: Tue 20 Dec 2011 16:54
by mindplay
ED for NH only seems to support the "where" attribute - it appears there is no support for filters?

The "where" attribute is an outdated NH feature - it's the predecessor of the filter features, and although it's not deprecated as such, documentation does generally recommend you use filters instead of the where-attribute -
Hibernate3 has the ability to pre-define filter criteria and attach those filters at both a class level and a collection level. A filter criteria allows you to define a restriction clause similar to the existing "where" attribute available on the class and various collection elements...
Is there any way to add custom attributes to the generated mapping files? If so, I could define the filters by hand, and apply them to the model using a custom property... Again, documentation for the template API is sparse...

Posted: Fri 23 Dec 2011 09:48
by Shalex
There is no "filter" support at the moment. We will investigate the possibility of its support but no timeframe.

Posted: Thu 05 Jan 2012 14:32
by Helen
The ability to pre-define filter criteria and attach those filters at both a class level and a collection level is implemented.

This functionality will be available in the nearest public build.

Posted: Thu 05 Jan 2012 14:36
by mindplay
Fantastic! Thanks!

Posted: Thu 12 Jan 2012 15:29
by Helen
The feature is available in the latest 4.2.110 build of Entity Developer.
The new build can be downloaded from http://www.devart.com/entitydeveloper/download.html (the trial and free versions) or from Registered Users' Area (provided that you have an active subscription).

For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=23135 .