newbie question about postgres: nextval

2009-01-26 Thread Ivano Luberti
Hello I have searched the net quite a lot but I have not been able to find the answer to this problem. I'm using postgres to generate torque classes but the automatic generation seems to make a few mistakes. In the base class I found this java statement private int pkAnagrafica = nextval('anagraf

torque documentation about peer base beans and map classes

2009-01-26 Thread Ivano Luberti
Hello, can someone point me to some documentation explaining the role of the various type of classes generated by Torque ? - To unsubscribe, e-mail: torque-user-unsubscr...@db.apache.org For additional commands, e-mail: torque-us

Re: newbie question about postgres: nextval

2009-01-26 Thread Ivano Luberti
Here it is . In my prev message I didn't said that , I have defined the db using the server , then I have generated the schema using the jdbc ant task and the classes using the om ant task. I don't want to define myself the shema file because I'm more famliar with SQL and then I don't want to make

Re: torque documentation about peer base beans and map classes

2009-01-26 Thread Ivano Luberti
Ok but it seems there is a broken link at the beginning to a page that seems promising http://db.apache.org/torque/releases/torque-3.3/runtime/documentation/relevant-classes.html Thomas Fischer ha scritto: >> Hello, can someone point me to some documentation explaining the role of >> the various

Re: newbie question about postgres: nextval

2009-01-26 Thread Ivano Luberti
Ok, now I understand why someone has choosen to change the java code of the JDBC ant task (found it on some mailing list) ! Thomas Fischer ha scritto: > I am surprised that the jdbc task recognizes foreign keys ? Or did you add > the foreign-key elements yourself ? > >Thomas > No the f

Re: newbie question about postgres: nextval

2009-01-26 Thread Ivano Luberti
a > few minutes (or can be automated for your specific DB standard). > Just remember that this is a small amount of time compared to what > it would take to write all the code that gets generated. > > > > > >> -Original Message- >> From: Ivano Luberti [mailto:lube...@ar

Re: newbie question about postgres: nextval

2009-01-26 Thread Ivano Luberti
I guess I need some aid in the field of comprehension ability: I tried to start using hibernate a few times but I have never found the right netry point in the docs, Torque has been really fast to learn at least to produce the first classes and first code for CRUD operations. Anyway, thanks again

Re: newbie question about postgres: nextval

2009-01-27 Thread Ivano Luberti
Thank you Greg I have found the docs on schema files. For what it worths, I will put my 2 cents on the Torque vs Hibernate matter. Usually you don't want to overwrite your sql if you are not in the early steps of db development: you change the DDL saving the data in some way. The utility of softwar

jdbc task put username instead of db name in schema file

2009-01-27 Thread Ivano Luberti
When we tried at first to generate the schema file using the jdbc task, we found that the database name put in the schema file was wrong. Instead of the db name there was the username used to connect to the db. We worked around it changing the username. We use Torque 3.3 The DB server is postgres

Re: jdbc task put username instead of db name in schema file

2009-01-27 Thread Ivano Luberti
h, but then why make the torque user able to specify the torque.database.name property in build.properties ? Thomas Fischer ha scritto: >> When we tried at first to generate the schema file using the jdbc task, >> we found that the database name put in the schema file was wrong. >> Instead o

Re: jdbc task put username instead of db name in schema file

2009-01-27 Thread Ivano Luberti
I certainly will, thanks Thomas Fischer ha scritto: >> h, but then why make the torque user able to specify the >> >> torque.database.name >> >> property in build.properties ? >> > > correct, I overlooked that back then. Please create a jira issue. > > Thomas > _ _

generate omn classes only for a subset of tables

2009-01-27 Thread Ivano Luberti
Is there a way to configure Torque generator so that it generates om classes only for a subset of the tables in a db ? I will use the ability of torque tu support multiple database to import some data from a secondary db, but I need to use only a small subset of tables (5 out of 40+) of the whole

Re: jdbc task put username instead of db name in schema file

2009-01-29 Thread Ivano Luberti
Sorry to come back on this issue: I have updated the TORQUE-39 issue on jira but I have seen no answer to the observations I have added to the initial ones. I report here the link to the issue for whoever is interested: https://issues.apache.org/jira/browse/TORQUE-39 Thomas Fischer ha scrit

Re: jdbc task put username instead of db name in schema file

2009-01-30 Thread Ivano Luberti
I have never meant this: I was only surprised you have been so responsive on the mailing list and that there was no activity on jira. Moreover I was surprised to find the issue already set and so old after you had asked me to report it. No problem, anyway. Thomas Fischer ha scritto: >> Sorry t

Re: newbie question about postgres: nextval

2009-02-11 Thread Ivano Luberti
Another little question about one of your suggestion. Remeber I use jdbc task to generate chema.xml file from the db. Greg Monroe ha scritto: > In general, for autoincrement id fields coming out of the JDBC task, > you will need to decide which method to use with automatic id fields. > This is

possible bug in Torque3.3 using two databases

2009-03-11 Thread Ivano Luberti
Hello, I think I have discovered a possible bug in Torque3.3 run time. My code does the following (simplilfied): 1) select some records from table1 in db1 using table1Peer.doSelect (Criteria) 2) import some of those records in table2 in db2 (default db set into Torque.properties) 3) update the r

multiple criteria on the same field

2009-05-08 Thread Ivano Luberti
Hello , I have searched the ml and googled for this. I have found 2 old email asking for this but with no answer. When I try to do this : Criteria criteria = new Criteria(); Criterion dataIscrizioneInizio = criteria.getNewCriterion(IscrizioniSocioPeer.TABLE_NAME, "starttime", (Date) (formUser.ge

Re: multiple criteria on the same field

2009-05-09 Thread Ivano Luberti
Users List >> Subject: Re: multiple criteria on the same field >> >> Hi, >> >> You need to do something like: >> >> criteria.add( dataIscrizioneInizio.and(dataIscrizioneFine) ) ; >> >> to add both Criterions in the same time to the Criteria. >

Re: Criteria.or not working?

2010-02-05 Thread Ivano Luberti
If you want to combine clauses mixinn and and or operators you should use Criterion. Look here for an introduction to how build queries using Criteria and Criterion http://db.apache.org/torque/releases/torque-3.3/runtime/reference/read-from-db.html Ludwig Magnusson ha scritto: > Hi! > > I have d

Re: Criteria.or not working?

2010-02-05 Thread Ivano Luberti
Magnusson ha scritto: > Yes that works, but that was not what I asked. > My question was, how can the methods and(), add() and or() all generate the > same result? > > -Original Message- > From: Ivano Luberti [mailto:lube...@archicoop.it] > Sent: den 5 februari 2010 14:1

Re: Criteria.or not working?

2010-02-05 Thread Ivano Luberti
e on this. I suspect the code is assuming >> that since there is no right hand conditional the or should be treated >> as an and statement. E.g. "Null or X" is translated to just X. It >> probably should throw an invalid syntax error here. >> >> FWIW, using

Re: [OT:Torque 4.0] Re: Criteria.or not working?

2010-02-06 Thread Ivano Luberti
Good to hear there is some movement in the Torque ecosystem I have used Torque 3.3 with good satisfaction to develop a web application from scratch and I plan, if my company can fund this activities, to port all of my company software db related under Torque. I don't know if I'm enough exper

Re: Info about Torque

2010-09-21 Thread Ivano Luberti
I have developed a software now in production using Torque 3.3 and it has been quitre strigthforward and efficient. Also integration in web dev framework (Tapestry) has been strightforward. I have to apologize with the developers: it was my intention to participate to dev work of the 4 version thi

get the SQL to be executed

2012-01-18 Thread Ivano Luberti
Hello all, is there a way in Torque to get the SQL that is sent to the DB. I have to generate a txt file where I save queries basically INSERT statements of long records. I was thinking of create the Torque classes, populate the objects with data that I get from a local instance of the DB and then,

Re: get the SQL to be executed

2012-01-19 Thread Ivano Luberti
Thanks all for your responses. Just to clarify, I need to generate sql commands inside my code to generate a file that can be used by another software (not written by me) to import data. I would like not to execute commands but only write them (because this is what I need). If I cannot find altern

Re: get the SQL to be executed

2012-01-20 Thread Ivano Luberti
l Message- > From: Thomas Vandahl [mailto:t...@apache.org] > Sent: Thursday, January 19, 2012 12:51 PM > To: Apache Torque Users List > Subject: Re: get the SQL to be executed > > On 19.01.12 18:38, Ivano Luberti wrote: >> Thanks all for your responses. >> Just