RE: Best Practices for read-only operations and concurrency?

2004-12-06 Thread KeyofDMinor
Thanks to everyone for their input. After some thought, I've decided that I was indeed being paranoid. Especially upon the revelation that the BasePeer.doSelect() method will create a transaction itself! (I am using doSelect() heavily.) In my scheme, I would have had a read-only transaction wra

Re: ClassCastException with torque

2004-12-06 Thread Hoang-Vu PHUNG
Problem solved. I thought there was a mismatch between torque 3.1.1 and 3.1. After having reinstalled torque 3.1.1 via maven, it worked again. The version management is really a headache stuff. --- Hoang-Vu PHUNG <[EMAIL PROTECTED]> a écrit : > Hi, > I'm new to torque. I have managed to use to

RE: Torque Maven Plugin Problem

2004-12-06 Thread Thomas Fischer
Hi Tod, I finally got a (_VERY_ dirty) solution for your problem. Perhaps some maven guru on the list can create a cleaner solution from this. Find the file /cache/maven-torque-plugin-3.1.1/plugin.jelly somewhere in your maven home directory. Add the path to classes12.jar into the torque class

Re: Join or Where Clause

2004-12-06 Thread Stefan Clos
hi Daniel, i would declare the Foreign Key as unique. cheers, Stefan Daniel Müller schrieb: Hello, I have 2 tables. In one table stand numbers in the secound table stand adresses. The have a foreign key NumberTable N_ID N_Number AdressesTable A_ID A_N_ID A_Name The adresses table have the foreign k

RE: Torque tries to insert 0 into nullable Foreign Key

2004-12-06 Thread Saravana Krishnan
Hi, Use this attribute in the database tag. defaultJavaType="object" There is a variant of this that can be used for a single table. Check out the mail archives. I have asked the exact same question before. -Sarav On Mon, 2004-12-06 at 09:48, [EMAIL PROTECTED] wrote: > Daniel- > > When gener

RE: Torque tries to insert 0 into nullable Foreign Key

2004-12-06 Thread Michael . Kashambuzi
Daniel- When generating you object using the om task, make sure you're using -schema.xml The "object" java type allows null values. Michael -Original Message- From: Vitzethum, Daniel [mailto:[EMAIL PROTECTED] Sent: Monday, December 06, 2004 7:22 AM To: Apache Torque Users Li

ClassCastException with torque

2004-12-06 Thread Hoang-Vu PHUNG
Hi, I'm new to torque. I have managed to use torque (versiion 3.1.1) to generate java classes and sql script. Then I ran into the problem with nullable field having foreign key constrainte. This field is a primitive data so according to one guy in the mailing list, I have to just add defaultJavaTy

RE: Best Practices for read-only operations and concurrency?

2004-12-06 Thread mark.a.gold
Even if a writer commits during a long read operation Oracle will still retain the session's read consistency. The mechanism Oracle uses for read consistency utilizes the rollback segments and the one caveat for this lies in the necessity for properly sizing rollback segments. If they are too small

Torque Build Problem

2004-12-06 Thread Tod Thomas
I am executing maven torque:jdbc to generate schema.xml. It continually displays this error: ... java.lang.ClassNotFoundException: classes12.jar Total time: 6 seconds Finished at: Fri Dec 03 15:22:58 EST 2004 classes12.jar is present. I have tried different iterations of the CLASSPATH and noth

RE: Join or Where Clause

2004-12-06 Thread Thomas Fischer
Hi Daniel, I have looked through the source code and it seems that your query cannot be generated generically with torque. The problem is that Torque does not support join conditions other than equal (=). My suggestion for a quick solution would be to use any of the methods BasePeer.ExecuteQu

Re: Torque tries to insert 0 into nullable Foreign Key

2004-12-06 Thread Vitzethum, Daniel
Hi Thomas, thanks for the quick answer (as usual ;-) > I had the same problem before, and as I needed a quick solution, I > used string foreign keys instead (String foreign keys can be null). I > will open a scarab issue on this problem. my quick workaround: I have overridden and copied "buildC

RE: Torque tries to insert 0 into nullable Foreign Key

2004-12-06 Thread Thomas Fischer
Hi Daniel, I had the same problem before, and as I needed a quick solution, I used string foreign keys instead (String foreign keys can be null). I will open a scarab issue on this problem. Thomas "Vitzethum, Daniel" <[EMAIL PROTECTED]> schrieb am 06.12.2004 13:22:17: > Hello list, > >

Torque tries to insert 0 into nullable Foreign Key

2004-12-06 Thread Vitzethum, Daniel
Hello list, one more question: I have a schema with nullable foreign keys of type "INTEGER". When saving a new object, Torque's buildCriteria method inserts 0 as the according column's value, what is wrong as it should be null. Even defaults in DB don't work therefore. My Oracle DB refuses to in

Re: Introducing "JoinHelper"

2004-12-06 Thread Henning P. Schmiedehausen
"Vitzethum, Daniel" <[EMAIL PROTECTED]> writes: Hi, this looks really interesting. Could you please open an Issue in the bug tracker with this class attached, so it does not get lost. And I'd appreciate an explict ASF 2.0 license in the header (or does your company has a CCLA on file?).

Join or Where Clause

2004-12-06 Thread "Daniel Müller"
Hello, I have 2 tables. In one table stand numbers in the secound table stand adresses. The have a foreign key NumberTable N_ID N_Number AdressesTable A_ID A_N_ID A_Name The adresses table have the foreign key A_N_ID=N_ID. In the number table stand very much numbers. Now i wont to find out wha

Introducing "JoinHelper"

2004-12-06 Thread Vitzethum, Daniel
Hello list, currently we are working with Torque and are trying to add a litle bit functionality. From our point of view, it is not sufficient to have join methods generated for two tables. In many cases, we need three or even more tables to retrieve data that should be stored back later - what ma

RE: Best Practices for read-only operations and concurrency?

2004-12-06 Thread Thomas Fischer
Hi, Most databases nowadays support transactions (I have heard rumours that even the new mysql versions do). So you can retrieve a connection, set its transaction isolation, use the read(), save()... methods with your connection, and then commit at the end. Depending which locking style your