"where" vs "filter" attributes in mappings

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
mindplay
Posts: 148
Joined: Tue 13 Dec 2011 22:58
Location: Ithaca, NY

"where" vs "filter" attributes in mappings

Post by mindplay » Tue 20 Dec 2011 16:54

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...

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 23 Dec 2011 09:48

There is no "filter" support at the moment. We will investigate the possibility of its support but no timeframe.

Helen
Devart Team
Posts: 127
Joined: Wed 07 Sep 2011 11:54

Post by Helen » Thu 05 Jan 2012 14:32

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.

mindplay
Posts: 148
Joined: Tue 13 Dec 2011 22:58
Location: Ithaca, NY

Post by mindplay » Thu 05 Jan 2012 14:36

Fantastic! Thanks!

Helen
Devart Team
Posts: 127
Joined: Wed 07 Sep 2011 11:54

Post by Helen » Thu 12 Jan 2012 15:29

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 .

Post Reply