db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From T E Schmitz <mail...@numerixtechnology.de>
Subject Re: retrieveByPK
Date Tue, 06 Sep 2005 07:23:49 GMT
barak wrote:
> Hi all,
>  
> Is there a way to configure torque so the method "retrieveByPK" in the
> peers will return null instead of an exception if no row matched the
> primary key?

Why don't you write your own retrieveByPK method in the class that 
extends the peer class?
Unfortunately, the peer class methods are all static, so you are not 
really overriding the base class' method but masking it.
Call the perr base class' method, catch the exceptions and return null.

> If it can be done, will this also effect other types of exceptions?



-- 


Regards/Gruß,

Tarlika Elisabeth Schmitz

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message