Hi,
You need to do something like:
criteria.add( dataIscrizioneInizio.and(dataIscrizioneFine) ) ;
to add both Criterions in the same time to the Criteria.
Best regards,
Andras
Ivano Luberti wrote:
Hello , I have searched the ml and googled for this.
I have found 2 old email asking for
Hi,
Use the Criteria.Criterion object, see here:
http://db.apache.org/torque/releases/torque-3.1/criteria-howto.html
That will work for sure.
Best regards,
Andras.
Mark Wassermann wrote:
Hi List
Im using torque 3.1.1 as part of turbine 2.3.2.
I want to create a quere to find an
Hello,
Sorry for the confusion created, problem solved.
Infact we have used Torque-3.1 and the problem was that the version of
dbcp was too old:
commons-dbcp-20030825.184428.jar
the correct one to use is commons-dbcp-1.2.1.jar
Best regards,
Andras.
Hello,
We have developed a web application with Torque3-2.
We have tested the scenario of stopping the DB server than restarting.
The web application should discover that
the Connections in the pool are broken, drop them and create new ones.
For this we used these value torque.properties:
Hello Greg,
We are using MS-SQL but the query is not the problem. This query
SELECT 1 is never called, is is not reaching the
SQL Server (we see this with the Profiler started)
What happens is that upon Torque.init these 2 properties:
torque.dsfactory.bookstore.pool.testOnBorrow=true
Hello,
Check here:
http://dev.mysql.com/doc/refman/4.1/en/cj-configuration-properties.html
You should add the autoReconnect or autoReconnectForPools in the
connection URL
of mysql.
Best regards,
Andras.
Rafal Markut wrote:
Hello,
I use Turbine 2.3.2 and Torque 3.1.1, Tomcat and MySQL
Hello,
Do not set torque.database.schema to null.
Try to set it to the name of the user who connects to the DB or to value
DBO (or dbo)
I had to add to SQL server so it might work for Sybase also.
Best regards,
Andras.
Thoralf Rickert wrote:
Okay, the property torque.database.schema has
Hello,
I have successfully used Torque and MSSQL with no problems.
Are you sure you are defining in your schema for the identity column
you have primaryKey=true autoIncrement=true?
Best regards,
Andras.
-
To unsubscribe,
Hello,
So you have in your schema like this:
database name=your_db defaultIdMethod=native
?
Which version of Torque are You using?
Also you have in torque.properties:
torque.database.your_db.adapter=mssql
?
Best regards,
Andras.
Trey Long wrote:
Yes, everything seems correct from my end.
Hello,
How did you configured the idMethod in your schema? You don't need
IDBroker since mysql should
support auto increment primary keys so you should go with
idMethod=native for tables with auto increment
primary key.
Best regards,
Andras.
Youngho Cho wrote:
Hello,
I read TRQ278 for
Hello,
Can You post your torque.properties file?
I have seen this error when i have not added correctly this line:
torque.database.YOURDB.adapter=mysql
Best regards,
Andras.
Youngho Cho wrote:
Hello,
Yes I know Torque support idMethod=native for mysql.
But I would like to use
Hello,
This should be possible with Criteria.CUSTOM, check here:
http://db.apache.org/torque/criteria-howto.html
I think in your case it would be something like:
crit.add(CategoryPeer.CODE ,(Object)Category.CODE + '%' LIKE '1'
,Criteria.CUSTOM);
Best regards,
Andras.
Trevor Miller
Hello,
Communication failure during handshake can be caused also by an
incompatible (old) MySQL driver.
You should try to get a mysql driver for version 4.1. and use this and
discard the old one.
Best regards,
Andras.
Jon August wrote:
Hi,
I saw this question asked before on the list,
Hello,
Why don't You put the torque.properties file in WEB-INF/classes/ and
load it like this:
if(!Torque.isInit())
{
PropertiesConfiguration pc = new PropertiesConfiguration();
pc.load(
this.getClass().getClassLoader().getResourceAsStream(torque.properties) );
Hello,
Can You give a concrete example what are You trying to do?
I think this case:
WHERE TABLE_1.COL_A = TABLE_2.COL_B
can be handled by:
crit.addJoin(Table1Peer.ColA,Table2Peer.ColB)
or this is not the join condition between the tables?
Also you may try to use Criteria.CUSTOM for the
Hello Elisabeth,
T E Schmitz wrote:
In this particular case, I have actually put together a sub-select,
which I retrieve with BasePeer.createQueryString() and add as an
AS-column in the main SELECT:
.
I've put this all together with Criteria except:
T.METHOD =
Hello Thomas,
My understanding is that if in the XML schema the foreign key
relation is defined Torque
will generate a protected method in BaseContactPeer
doSelectCotactJoinByPhoneNumbers() (or something like that)
So all that needs to be done is to make it public in ContactPeer.
This
Hello,
This is a MySQL related prolbem You must specify autoreconnect=true (or
something like) that at connection
properties. You will find this info on the mysql site, jdbc connection
properties.
Best regards,
Andras.
Matthew P. Reath wrote:
I'm developing a web-based application using
Hello,
This should be possible, torque uses commons DHCP:
http://jakarta.apache.org/commons/dbcp/configuration.html
See there how to log the abandoned connections.
Best regards and Happy Holidays,
Andras.
Husek, Paul wrote:
Guy,
Thanks for the response. While I realize I can (and should) do
Hello,
You could check a method generated by Torque: doSelectJoin
this does the same thing, retrieves data from 2 or more tables.
(doSelectJoin... methods are generated in BaseXXPeer when foreign keys
are defined)
You have to check the code and than write your own code based on
what you
Hello Lucas,
I would try to play a little bit with the connection settings of mysql, see:
http://dev.mysql.com/doc/connector/j/en/index.html#id2424263
(Connection Properties*)
*I think what it interests you is the 'autoReconnect' property.
Best regards,
Andras.
Lucas Fragomeni wrote:
Help!
Here
Hello,
I think when you are using idMethod=none torque know that you are
in charge of setting the primary key
values and doesn't try to set them.
What you have to do is to do a select on AddressB322Peer after insert
to get it back your AddressB322
also with the ID inserted by your trigger
Hello,
Althrough this is a little bit OT for Torque list ;) I will try to
give you some hints .
Make sure you don't have any firewall blocking your TCP port 3306.
The console(and phpmyadmin) maybe connects through unix socket not
TCP/IP , try with mysql --host=hostname
Try other possibilites
Hello,
Michael Moossen NO TENGO! . wrote:
Hi, all
first of all, i want to give my solution for counting the number of rows with a Criteria, a question i saw no remember where, may be in the wiki?
take a not null column (may be a pk column), add the condition:
row is not null
and add a
Hello,
I don't know about criteria.or but you may try to do it with
Criteria.Criterion
See:
http://db.apache.org/torque/criteria-howto.html
section Using Criterion to use a Column twice in a Criteria
Best regards,
Andras.
Daniel de los Reyes wrote:
Hello,
I am trying to make a query that may
Hello,
Can you explain what is wrong?
I see no error in this code ... you will get back a List of
Objects of type XXX if you are in XXXPeer.
Best regards,
Andras.
ron piterman wrote:
Hi,
I use the following code to query (inside the Peer class, so the
constants are class constants...)
Hello,
I don't see why you need to work with the SQL itself as String, the
whole idea of Torque is to do
selects (and any other DB operation) with the Criteria object.
Best regards,
Andras.
ron piterman wrote:
The * is missing in the parsed SQL, so I get an SQL error :(
Hello,
How is your torque.properties file look like?
Do you have a line like:
torque.database.yourdb_name.adapter=mysql
?
Best regards,
Andras.
ron piterman wrote:
Hi,
I am using torque with mysql, generating the schema vie the ant jdbc
task, and then the obejct model with the om task.
When
Hello,
Torque doesn't need the schema at runtime, all the information is
stored in the Map classes.
Currently i think Torque is confused at your side which method to use
to generate unique keys:
IDBroker - this is implemented in Torque
Native - this is implemented by the DB in your case
Hello,
How is your connection settings in torque.properties?
Try to use the second type of pool:
org.apache.torque.dsfactory.SharedPoolDataSourceFactory
Best wishes,
Andras.
Nathan Mcminn wrote:
Has anybody ever seen this exception before? Most of the time I'm not
having any issues, but once in
Hello Derek,
I think you have the same problem as i did a long time ago, the
com.workingdogs.village.Column.readonly() method
always returns true and the update statement is not built correcty.
See my post about the problems i had :
http://nagoya.apache.org/eyebrowse/[EMAIL
Hello,
I think you have to create 2 Criteria objects and use this method:
BasePeer.doUpdate(selectCriteria, criteria, con);
Best wishes,
Andras
newton mn wrote:
hi
update UserContentRating set Rating=+rating+ ,ts='+ts+'+ where
ContentItemId=+item_id+ and UserId='+uid+';
The above query,
Hello,
How does your torque config file (torque.properties) look like and
where is placed?
Regards,
Andras.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello Drake,
I think than this line is missing:
torque.database.cms-cms.adapter=mysql
Add this after
torque.database.default = cms-cms
Regards,
Andras.
Drake Philbrook wrote:
Hi Andras,
Torque.properties lives in /WEB-INF/classes.
Here is the content...
log4j.rootCategory=DEBUG, default
Hello,
I think at jdbc target the problem is the schema:
[torque-jdbc-transform] schema : ${databaseSchema}
You should specify in build.properties:
torque.database.schema =
but i don't know what this vaules should be for postgres maybe the owner
of the tables?
(i.e. the username who created
Hello Travis,
I think there currently there is no method to allow passing a
Connection object also.
I see 3 possibilities:
1) Let Torque get the Connection the same way you get it
(see in torque.properties there is an option also for jndi and I think
also more,
maybe you can make a
Hello,
What about using the Criteria Object?
Critetria crit=new Criteria();
crit.add(ObjcontentPeer.folderID,folder.getObjid());
crit.add(ObjcontentPeer.OBJ_ID,getObjid());
List l=ObjcontentPeer.doSelect(crit);
Best wishes,
Andras.
[EMAIL PROTECTED] wrote:
As requested, here is the code
/*
Hi,
You can try to use the Jdbc2Pool (the second pool type in
torque.properties):
Here you can enter a validation query, ex:
torque.dsfactory.yourdb.pool.validationQuery=SELECT 1
Best wishes,
Andras.
Jeff Rasmussen wrote:
I have been using torque for some time and have run into issues when the
Hello,
We had the same problem using Sybase DB, and we did exactly the
same, modified
the village classes to set readonly=false.
I think only ResultSetMetaData can return the meta data of a
table (i.e. column info)
and not DatabaseMetaData.
Best wishes,
Andras.
Vikas Phonsa wrote:
Hello Hassan,
Does your torque.properties file contain:
torque.database.default=m3c
torque.database.m3c.adapter=postgresql
??
Hope it helps,
Andras.
Hassan Abolhassani wrote:
I tried to follow your advises but still have the same problem.
Hello Bogdan,
I think this line:
torque.database.schema = dbo
is missing from your build.properties file.
Also i'm not sure exaclty what values should hae, dbo works for me.
Best wishes,
Andras.
Bogdan Vatkov wrote:
Hi all,
I have tried to reverse xml schema from ms sql server via jdbc target..
Hello Josh,
What happens is the torque loads each object (if its doesn't have it
already ) from the DB.
You should try to use the methods doSelectJoin to tell torque that
make a join in the tables
and load all objects form one shoot, or i think better is to make your
own method
Hello,
I'm not 100% sure but i think this line is wrong:
torque.database.shema = bookstore
This should be set to the owner of the tables with uppercase i.e. DBO
or what appears as owner of the tables in Enterprise Manager.
Best wishes,
Andras.
No.9 wrote:
Hi ,
Now I'm tryng to generate a
Hello,
We have used torque sucessfully with Adaptive Server Anywhere for UNIX
8.0.0.
Best wishes,
Andras
szul wrote:
Hi!
According to the web site, torque supports sybase. Sybase has two
database products: Adaptive Server Enterprise and Anywhere. I suppose
that ASE is supported but how
- Original Message -
From: Matt Reath
To: 'Apache Torque Users List'
Sent: Thursday, August 07, 2003 5:39 PM
Subject: RE: Problems with save() method with Peer class
Andras,
I've included my config files. I hope you can help.
Hello Matt,
I just seen that you are
- Original Message -
From: Jenny Brown [EMAIL PROTECTED]
To: Turbine Torque Users List [EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 21:44
Subject: Re: problem configuring data source
I'm still having trouble, this time with id generation...
org.apache.torque.TorqueException:
46 matches
Mail list logo