Re: Transactions and saving - problems with commit

2003-09-18 Thread Scott Eade
Ashley Hayes wrote: conn = Transaction.beginOptional("yourb DB name", true); // then save with the conn object contact.save(conn ); company.setContact(contact); company.save(conn ); Transaction.commit(conn); More standard would be to replace the first line above with: conn = Transaction.begin(

RE: MIN, MAX, AVG etc.

2003-09-18 Thread Mansour Raad
Eric, Did u ever figure out how to create a criteria with 'MIN' ? Any help is much appreciated. I followed the link below, but it only refers to DISTINCT ! Mansour :-) -Original Message- From: Eric Emminger [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2003 12:59 PM To: Apach

Re: Transactions and saving - problems with commit

2003-09-18 Thread Graham Leggett
Graham Leggett wrote: conn = Transaction.beginOptional("yourb DB name", true); // then save with the conn object contact.save(conn ); company.setContact(contact); company.save(conn ); Oops - ignore me - I had specified contact.save() instead of contact.save(conn), which caused the problem, which

Re: Transactions and saving - problems with commit

2003-09-18 Thread Graham Leggett
Ashley Hayes wrote: think you need to get a DB connection to do the saving with... conn = Transaction.beginOptional("yourb DB name", true); // then save with the conn object contact.save(conn ); company.setContact(contact); company.save(conn ); Transaction.commit(conn); This is exactly what I am

RE: Transactions and saving - problems with commit

2003-09-18 Thread Ashley Hayes
think you need to get a DB connection to do the saving with... conn = Transaction.beginOptional("yourb DB name", true); // then save with the conn object contact.save(conn ); company.setContact(contact); company.save(conn ); Transaction.commit(conn); -Original Message- From: Graham Leg

Transactions and saving - problems with commit

2003-09-18 Thread Graham Leggett
Hi all, I have two Torque generated objects, the first is linked to the second via a foreign key. When I save the objects, I do this: contact.save(); company.setContact(contact); company.save(); And this works fine - both objects are saved correctly, and as they are new objects, Torque handles

RE: No build-torque.xml in 3.1 distribution

2003-09-18 Thread Juan Pablo Liska
thanks. didnt notice they had been split in two. -Original Message- From: Martin Poeschl [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:31 AM To: Apache Torque Users List Subject: Re: No build-torque.xml in 3.1 distribution try the torque-gen dist ;-) martin Juan Pablo

Torque fails to create the tables if the column or table name contains space

2003-09-18 Thread Virenderjit Singh
Hi all I am trying to create a table on MSSQL Server using torque. The one of the columns is 'Description of problem'. The torque fails to create the database. How to handle the spaces in the names. The portion of the torque log file is: [torque-sql-exec] Failed to execute: /* ---

Torque and autoCommit

2003-09-18 Thread Graham Leggett
Hi all, I would just like to clarify Torque's behavior with the autoCommit flag: Say I requested a connection from Torque, and set the autocommit flag to false, and returned that connection to Torque like so: Connection conn = Torque.getConnection(); conn.setAutoCommit(false); Torque.closeConne

RE: runtime torque problem..help...solved

2003-09-18 Thread Thomas J. Harris
For Oracle, you must also define the schema attribute the same name as the username. Tom -Original Message- From: love cars [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 12:03 AM To: Apache Torque Users List Subject: Re: runtime torque problem..help...solved Kinda silly

Problem upgrading from 3.0 -> 3.1 ( Bad Timestamp )

2003-09-18 Thread anon permutation
Hi, There seem to be a problem with 3.1 when generating sql statement for timestamp for postgresql. When I issue the following code: Criteria selectObj = new Criteria(); selectObj.add(InstruIntradayPeer.INSTRU_PK, instruPk); if(beginDate!=null){ Criteria.Criterion addBeginDate