db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ferruh Zamangoer" <ferruh.zamang...@gistec-online.de>
Subject AW: AW: single column pk tables
Date Tue, 24 Aug 2004 09:12:08 GMT
Hi,

I tried out you suggestions but it does also not work. I have the following
Code:

Freetext freetext = new Freetext();
freetext.setModified(true);
freetext.setNew(true);
freetext.save();

Thanks for any help?

Regards
FZ





-----Ursprungliche Nachricht-----
Von: Thomas Fischer [mailto:Fischer@seitenbau.net]
Gesendet: Montag, 23. August 2004 22:05
An: Apache Torque Users List
Betreff: Re: AW: single column pk tables






Hi,

could well be that you are right. The methods to call are setModified(true)
and setNew(true); probably setNew(true) is not necessary but it cannot
hurt.
 It is not necessary to extend the base class, these methods are alrady
public.

Thomas

"Saravana Krishnan Kannan" <saravkrish@uky.edu> schrieb am 23.08.2004
16:23:12:

> Hi,
>
>  I think Torque doesn't try to save the record since it has a
> something like a "isNew" or "mustUpdate" flag and it gets set only
> if you set some field. Since you don't set anything in your table,
> the flag is not set and Torque doesnt write to the DB. I think there
> is a method to set this flag explicitly, if no, simply extend the
> BaseXXX class to add this method and call it before you try to save
> the record. I think I'm right. Its been really long since I looked
> into Torque code.
>
> -Sarav
>
> -----Original Message-----
> From: "Ferruh Zamangoer" <ferruh.zamangoer@gistec-online.de>
> To: "Apache Torque Users List" <torque-user@db.apache.org>
> Date: Mon, 23 Aug 2004 15:19:47 +0200
> Subject: AW: single column pk tables
>
> Hi Scott,
>
> I also know that a table like this is totally pointless, but the problem
is
> that I have a Databaschema which is determined by ISO Standard. I can't
> redesign the schema or add a column to this table? Are there any options
> where I can turn off these restriction check?
>
> Regards
> Ferruh
>
> -----Ursprungliche Nachricht-----
> Von: Scott Eade [mailto:seade@backstagetech.com.au]
> Gesendet: Montag, 23. August 2004 14:20
> An: Apache Torque Users List
> Betreff: Re: single column pk tables
>
>
> Ferruh Zamangoer wrote:
>
> >Hi NG,
> >
> >in michaels posting my experience with torque I read the following:
> >   in torque's docs i have not seen any word speaking about the
restriction
> to
> >single column pk tables.
> >
> >Are there no another way to solve this problem, if I have single column
pk
> >tables.
> >In my schema I use the  defaultIdMethod="native"
> >
> >
> ><table name="freetext" description="freetext">
> ><column
> >  name="id_freetext"
> >  required="true"
> >  primaryKey="true"
> >  type="INTEGER"
> >  size="5"
> >  description="ID Freetext"/>
> ><id-method-parameter value="freetext_seq"/>
> ></table>
> >
> >How can I set any value to a table, which is defined like the table
above
> ??
> >
> >I've tried the following code but it doesn't works:
> >
> >Torque.init("Torque.properties");
> >
> >Freetext freetext = new Freetext();
> >freetext.save();
> >
> >Any help is appreciated!
> >
> >
> Such a table is totally pointless and is hence rejected by the Torque
> runtime.
>
> Try adding some actual data columns to the table definition.
>
> Scott
>
> --
> Scott Eade
> Backstage Technologies Pty. Ltd.
> http://www.backstagetech.com.au
>
>
> ---------------------------------------------------------------------
> 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
>
>
>
>
>
> ---------------------------------------------------------------------
> 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


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