Re: Can I use mergedir in Hibernate plugin?

"Alan She" <[email protected]> Tue, 19 Dec 2006 12:25:01 +0800
Newsgroups gmane.comp.java.xdoclet-plugins
Message-ID <[email protected]>
I try to use some base class to do this.

/**
 * @hibernate.filter-def name="effectiveDate"
 * @hibernate.filter-param name="asOfDate" type="date"
filterdef-name="effectiveDate"
 * @hibernate.filter name="effectiveDate" condition=":asOfDate BETWEEN
eff_start_dt and eff_end_dt"
 */
public class BaseObject {
...
}

/**
 * @hibernate.class table="user"
 */
public class User extends BaseObject {
...
}

However the User.hbm.xml do NOT applied the hibernate filter nor the
filter-def tag.
Am I missing something?
I tried the similar approach on collections, filter element will be
inherited but not filter-def element.
How to make every hbm file contains the filter-def?
What if I need a class level filter? Can I use inherited the class level
filter?

2006/12/18, Konstantin Priblouda <kpriblouda-/[email protected]>:
>
>
> --- Alan She <[email protected]> wrote:
>
> > Hi,
> >
> > Thanks for your quick reply.
> > I have a very general hibernate filter which need to
> > define in EVERY hbm
> > files.
> > I think merge is a pretty easy way to done this, am
> > I wrong?
>
> It could be done by merge of course, but mergepoints
> have to be defined. ( If there is a patch, it can be
> applied quickly )
>
> > I don't really want to define a filter in every hbm
> > file, because even I use
> > XD2,
> > I can hardly make sure all the developers remember
> > to type the @
> > hibernate.filter ...
> > in the head of every classes.
> > Any suggestion to solve this??
>
> You can use some base class to do this, or even
> implement an interface and place filter mapping there.
>
> regard,
>
> ----[ Konstantin Pribluda http://www.pribluda.de ]----------------
> Still using XDoclet 1.x?  XDoclet 2 is released and of production quality.
> check it out: http://xdoclet.codehaus.org
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> xdoclet-plugins-interest mailing list
> xdoclet-plugins-interest-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
xdoclet-plugins-interest mailing list
xdoclet-plugins-interest-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest