Hi all!
I'm not on this list, but I think, you are or someone who's looking for an
answer is interested in solving the log4j error in torque-gen und torque.
The problem is, that torque and torque-gen report a problem, that there is
no log4j appender for org.apache.torque-gen.engine and
Hiho!
I've little freaky question. There a two tables:
Table #1 (debitor) has following columns:
id (primary)
address_id (not null, foreign key to address)
invoice_address_id (not null, foreign key to address)
delivery_address_id (not null, foreign key to address)
...
Table #2
Some template sets for databases do not allow forward
declarations on foreign key. So you have to make sure that
the referenced table is before the referencing table in the schema.xml
Ah, maybe it's not part of this thread but I remember that I had this
cross reference problem with Torque
. I am not aware of problems with mysql
at the moment, but I do not know the reason for not having
any problems, cause the templates were not changed since
then. I will look into it and maybe we'll come back to your offer.
Thomas
Thoralf Rickert [EMAIL PROTECTED] schrieb am
)
-Original Message-
From: Thoralf Rickert
I don't think that there is really a problem with torque and
mysql. Normally everything is fine, but at that time
something like this, doesn't worked:
table name=tableA
foreign-key foreignTable=tableB
reference local
Question 1: Is there a way to maintain the CamelCase of the tables
inside of the torque classes? ex: If I have a table named
accountTypes I get classes such as AccounttypesBase, AccounttypesPeer
and Accounttypes.
Is it possible to get proper casing out of Torque like
AccountTypesBase?
I have the exact same problem. After some debugging, I
found out that
the problem lies on the way village translates the output of the jdbc
driver. The drivers returns an integer for the fields of type
bit (1 for
true, 0 for false). Village obviously (I don't have the source code)
Yes, have a look at the ant documentation. You have to set a proxy in the ant
build file, like this.
project
setproxy proxyhost=192.168.. proxyport=8080
nonproxyhosts=mylocalhosts,.../
...
/project
Is UnknownHostException really a Proxy problem or a DNS problem?...
-Ursprüngliche
Yes, you can do it very easy with ant. See
http://db.apache.org/torque/releases/torque-3.2/generator/index.html and
http://db.apache.org/torque/releases/torque-3.2/generator/tasks-reference.html
bye
Thoralf
-Ursprüngliche Nachricht-
Von: Matthias Klein [mailto:[EMAIL PROTECTED]
Hi!
I try to generate a XML schema for a Sybase database. The problem is
that the task runs without an error but the generated schema.xml is
empty. I think, I forgot a property but I don't know which one. Here are
my torque properties and the generated output:
#
torque.database.type=
(it works with mysql).
bye
Thoralf
-Ursprüngliche Nachricht-
Von: Thoralf Rickert [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 11. Juli 2006 15:42
An: Apache Torque Users List
Betreff: Problem with SQL Task jdbc
Hi!
I try to generate a XML schema for a Sybase database
with SQL Task jdbc
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
Hi!
I've created a schema.xml for an existing Sybase database and I was able
to generate the corresponding java classes. If I try to make a query
with them I run into a problem. The database uses case sensitive column
names but torque generates uppercase column names. For example the
following
the database; if the database is case sensitive and the
DatabaseMetaData does not preserve case it is a bug of the
jdbc driver.
Thomas
On Thu, 13 Jul 2006, Thoralf Rickert wrote:
Hi!
I've created a schema.xml for an existing Sybase database and I was
able to generate
in
the same case as they appear in the schema file. If this is
not the case, this is a bug. This is Torque 3.2 and you did
not change anything there, I assume ? If yes, would you mind
to submit a bug report to Jira ?
Thomas
Thoralf Rickert [EMAIL PROTECTED] schrieb am 17.07.2006
09
Hi,
there is currently a discussion about that problem on this list and a bug
report ( http://issues.apache.org/jira/browse/TORQUE-44). If you need it now,
you have to change the Torque templates that generates the column names in the
Torque classes (Peer.vm and MapBuilder.vm). There is no
generation flag?
-Original Message-
From: Thoralf Rickert [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 4:45 AM
To: Apache Torque Users List
Subject: AW: Sybase case insensitive column names
Okay, I'll submit a bug report.
-Ursprüngliche Nachricht
Just one idea - I'm not using Oracle - but what about:
(column = '' OR column IS NULL)
In Torque
Criteria.Criterion c1 = criteria.getNewCriterion(COLUMN, , Criteria.EQUAL);
Criteria.Criterion c2 = criteria.getNewCriterion(COLUMN, (Object)null,
Criteria.ISNULL);
criteria.add(c1.or(c2));
Why cannot we write a code in this method which simply says -
if db is of type dboracle and if criteria= then criteria is null
Maybe because nobody wrote a patch or a jira issue. :)
http://issues.apache.org/jira/browse/TORQUE
Sort of a clean approach, but not working due sql exections:
[...]
criteria.addNotIn(KundenadressePeer.KUNDENADRESS_ID,
AdressenreferenzPeer.doSelect(subCriteria));
[...]
Just a question because I'm not sure if you just show an example or the
real code, that you're using. The
-
Von: Thoralf Rickert [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 20. Oktober 2006 11:24
An: Apache Torque Users List
Betreff: AW: Problems to set up a subquery
Sort of a clean approach, but not working due sql exections: [...]
criteria.addNotIn(KundenadressePeer.KUNDENADRESS_ID
Hi!
What is the best solution to compare two columns in a criteria? Or is a
CUSTOM-Criteria in
criteria.add(COLUMN_A,(Object)(COLUMN_A+=+COLUMN_B),Criteria.CUSTOM);
the only possible solution (using plain SQL) or is there something
better?
bye
Thoralf
Hi!
What is the best solution to compare two columns in a criteria?
Or is a CUSTOM-Criteria in
criteria.add(COLUMN_A,(Object)(COLUMN_A+=+COLUMN_B),Criteria.CUSTOM);
the only possible solution (using plain SQL) or is there something
better?
bye
Thoralf
Hi!
I just set up a new 2 server cluster with two instances of
Tomcat both reading/writing from a single database. I'm
using Torque 3.0, the default ID Broker and MySQL 5. (InnoDB)
It's not the answer for your question, but why do you use ID Broker with
MySQL? It has integrated auto
It's a little bit off-topic but have a look at How to set up a load-balanced
MySQL cluster (http://www.howtoforge.com/loadbalanced_mysql_cluster_debian).
If you use a load-balancing server in front of the mysql cluster you don't have
to change your application. The HowTo uses UltraMonkey to
Try size=7,2 instead of size=.. scale=..
-Ursprüngliche Nachricht-
Von: Jon August [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 14. Dezember 2006 13:52
An: Apache Torque Users List
Betreff: Re: BigDecimal and MySQL decimal
Hey Alvaro,
Thanks for the suggestion. I tried
Hi!
Did you try database defaultJavaType=object. Then every primitive
(long,int,boolean,...) is an object (Long, Integer, Boolean, ...). I think, you
cannot set this for a single table. Just for all.
bye
Thoralf
-Ursprüngliche Nachricht-
Von: Shilpa Kulkarni [mailto:[EMAIL
Hi!
If it isn't possible to use a transaction connection you can use a timestamp
column to verify if the row is changed in the database. Before saving the
instance you can read the timestamp column from the DB and compare it with the
timestamp that is set in your instance (this should be done
Hi!
I'm not sure, if this was discussed before, but I want to send you this
extension.
Currently I'm working on somekind of backup-procedure that reads some
data from a database and creates a complex XML file (for example: stores
with addresses and products). To do this, I have to get all
Hi Thomas,
Yes, you're right. It's similar to LargeSelect. But I think, it has two
advantages. With the correct combination of Criteria and
CriteriaPopulator I'm able to use doSelectJoinXXX and construct multiple
Torque objects at the same time (in my example this could be a store and
the
Hi!
Could you try a myObject1.copy(false) to avoid making a deepcopy.
bye
Thoralf
I'm using torque to connect to my Mysql database.
I'm trying to improve performence of my application and I saw
that torque is taking more than 600 ms to execute a command like:
Hi!
Is it possible, that your application uses many transactions? If you forget to
close this connections - the pool is running out of connections from time to
time. Maybe there is just one unclosed transaction somewhere in your
application. If you have a lot of traffic on your site you can
of the connections. Even though
I've set the validationQuery.
Thank you.
Eduardo.
- Original Message -
From: Thoralf Rickert [EMAIL PROTECTED]
To: Apache Torque Users List torque-user@db.apache.org
Sent: Wednesday, May 02, 2007 8:22 AM
Subject: AW: Could not retrieve connection
Hi!
I'm not sure if I understand you problem. But does it make sense to declare a
foreign key for primary key in the same table? Normally you declare the foreign
key in COUPON and make a reference to MEMBER. Maybe Torque doesn't like this
double key-definition in MEMBER. But I'm not sure
, since there can be only one member per coupon! I
want a member object, with a list of (zero or more) coupons.
Thoralf Rickert wrote:
I'm not sure if I understand you problem. But does it make sense to
declare a foreign key for primary key in the same table?
Normally you
by one member.
A member may have any number of coupons.
SQL has no trouble setting up such a relationship without a
third table. Do I need the third table to satisfy Torque?
Thoralf Rickert wrote:
Ah, okay, a coupon has only one member. Is it possible to have a
member that has
Hi all,
I try to extract a database schema from a SQL Server 2005. I tried both drivers
jTDS and the Microsoft JDBC Driver 1.2. In both versions I can access the
database, but the resulting XML schema for Torque is empty.
When I run the JDBC task in build-torque.xml (fresh 3.3) I got this
What Torque does is it opens a connection to the db, goes for
the metadata of the connection and makes the call
tableNames = dbMeta.getTables(null, dbSchema, %, types);
Maybe you can try to do this manually and play around to see
what goes wrong ?
It may also be that you have a
One question, the tasks part of torque uses your build.properties info to
connect to
the server. Are you changing the values here or in the Torque.properties
file, which
only effects the runtime?
Actually I changed the build-torque.xml to use a config.properties. Which
contains
you try to use the configured schema name instead of %
? Maybe a case sensitivity issue ?
Sorry, just wild guesses,
Thomas
Thoralf Rickert [EMAIL PROTECTED] schrieb am
10.04.2008 18:05:45:
What Torque does is it opens a connection to the db, goes for the
metadata
Hi,
Of course the list of problems with mssql doesn't stop...
I've got now a xml schema from the existing database. Some lovely boy decided
years ago that it would be nice to use spaces inside the column names of the
database scheme. For example: Time after. This is not a problem if you use
maintainable but...
-Original Message-
From: Thoralf Rickert [mailto:[EMAIL PROTECTED]
Sent: Friday, April 11, 2008 8:39 AM
To: 'Apache Torque Users List'
Subject: Column names with spaces
Hi,
Of course the list of problems with mssql doesn't stop...
I've got now a xml schema
the classes
that don't compile. You'd also have to make sure the Map
classes used the correct strings as well. Not very
maintainable but...
-Original Message-
From: Thoralf Rickert [mailto:[EMAIL PROTECTED]
Sent: Friday, April 11, 2008 8:39 AM
To: 'Apache Torque Users List
Hi,
yes that's it. I forgot the defaultIdMethod. That happens when I don't copy
paste the definition from one file to another. Definitely user-fault!
Thanks
Thoralf
-Urspr?ngliche Nachricht-
Von: Thomas Fischer [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 22. Mai 2008 20:58
An:
keys
Thoralf Rickert wrote:
I've defined a table:
table name=report
column name=id required=true type=BIGINT primaryKey=true
autoIncrement=true/
Does table name=report idMethod=native change something?
Bye, Thomas
45 matches
Mail list logo