I think the abstract class is the only solution as of now.. however the
idea Stein suggested looked just like it.. there should have been such a
feature.. It seems more with the philosophy of isolation of database from
a java programmer.. Has no one faced a similiar problem.. I think it is
time we added the feature..

Fasih

On Sun, 11 Jan 2004, Stein M. Hugubakken wrote:

> Fasihullah Askiri wrote:
> > 
> >>SELECT o FROM dot.com.User o where firstName like $1 or lastName like $1
> >>order by lastName, firstName
> > 
> > as in the base class i dont know the fields in the derived class...
> > 
> > one way is to obviously implement the function as an abstract function and
> > implement the query in the derived class.. but is there any other
> > alternative???
> > 
> 
> What about an abstract method to get the required search-fields?
> 
> A nice feature by Castor could be something like this:
> 
> mapping:
> <class name="dot.com.User"...>
> <fields...>
> </fields>
> <search name="search1" order="desc">
>               <field name="fieldName1">
>               <field name="fieldName2">
> </search>
> </class>
> 
> code:
> Search search = db.search("dot.com.User", "search1", args);
> 
> Stein
> 
> ----------------------------------------------------------- 
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev
> 

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to