db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "netseeker" <netsee...@manskes.de>
Subject RE: Problem with torque.addSaveMethod
Date Thu, 08 Apr 2004 18:42:23 GMT
Hi,

i guess this is a inconsistency but there exists some possible
"workarounds":

1. create your own BaseObject class, which is NOT a subclass of
org.apache.torque.om.BaseObject and does not contain the save() signatures.
http://db.apache.org/torque/generator/schema-reference.html:
"Attribute: baseClass
The base class to use when generating the Object Model.
This class does not have to extend org.apache.torque.om.BaseObject"

2. extend org.apache.torque.om.BaseObject and implement these
abstract methods as "do-nothing methods".

With both soulutions you have to add the attribute "baseClass" to your
torque schema:
<database
	name="MY_DATABASE"
	baseClass="mypyackage.BaseObject"
	...
</database>

so long
Micha

PS.: It's just a suggestion - i didn't test if this really will work.


> -----Original Message-----
> From: Alexandru Dovlecel [mailto:alexandru.dovlecel@siemens.com]
> Sent: Thursday, April 08, 2004 10:18 AM
> To: 'Apache Torque Users List'
> Subject: Problem with torque.addSaveMethod
>
>
> Hi all,
>
> I am trying to clean the model generated by torque (don't want to have
> myobj.save, myobj.insert and so on, Peer classes are just enough for me).
> How can I achieve this.
>
> I have tried setting
> addSaveMethod = false
> complexObjectModel = false
>
> It really generates cleaner code (only POJO), but... they are not
> compilable
> :(((. Because the BaseMyObj extends the BaseObject, which defines three
> abstract methods: save(...) x 3.
>
> Is this a problem with the Torque generator or I want to do something that
> torque is not supposed to support? Or, am I doing something wrong???
>
> Pls help. Thanks,
> Alex
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.651 / Virus Database: 417 - Release Date: 05.04.2004
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.651 / Virus Database: 417 - Release Date: 05.04.2004


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