开发者

Coldfusion ORM and Hibernate Filters

I ask you because I'm searching a useful solution to filtering automatically my entity collections.

Almost every one of my models have a property true/false called 'active' that authorizes or not an en开发者_JS百科tity to be loaded. It's use only in front end.

After a lot of googling I found the hibernate Filter mechanism and it look like what I'm searching for. But unfortunately I found no way to use it through Coldfusion except using autogenmap = true and modify manually the .HBMXML. I don't find this solution very sexy and I'm seacrching a better. Anyone ?

Thanks!


<cfproperty name="unsoldArts" cfc="Art" 
            fieldtype="one-to-many" fkcolumn="ARTISTID" where="issold=0">

http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WS5FFD2854-7F18-43ea-B383-161E007CE0D1.html

You may use where="" if you like, but my CFC usually needs to manage all entities even when it is not active.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜