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




Reply via email to