db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "barak" <ba...@fetchbook.info>
Subject RE: retrieveByPK
Date Tue, 06 Sep 2005 08:44:14 GMT
This is sort of what I'm doing now, but I preferred using something more
basic if possible.

Thanks

-----Original Message-----
From: T E Schmitz [mailto:mailreg@numerixtechnology.de] 
Sent: Tuesday, September 06, 2005 9:24 AM
To: Apache Torque Users List
Subject: Re: retrieveByPK


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



---------------------------------------------------------------------
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