db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fox <Thomas....@seitenbau.net>
Subject RE: Problems migrating to Torque 4
Date Thu, 04 Jul 2013 13:52:38 GMT
Thomas Vandahl wrote:

> - What is the equivalence of
> <runOnlyOnSchemaChange>true</runOnlyOnSchemaChange> ? I have Maven
> integration active in Eclipse so the current situation means that the OM
> classes are being generated on every build which in turn means that the
> sources are never current. This is at least irritating.

No such functionality is implemented at the moment. It is not a fundamental
problem, it just isn't there and noone noticed till now.

> - Is there any replacement for criteria.clear()? How is a Criteria
> object supposed to be re-used? (Just a note that some generated methods
> are not compatible with the deprecated Criteria class but this is not a
> stopper).

Why would you want to reuse a criteria and clear all its content? Just
create a new one.

> - I use the getAJoinB() methods in the OM classes. I have the following
> table relation:
>    A - AtoB - B
> Now in A there used to be a generated method getAtoBJoinB(Criteria)
> whereas in Torque4 there is only getAtoBJoinA(Criteria) which is kind of
> confusing. Is this a bug or a feature?

I am not really sure about this. I never understood the logic how the
getSomethingJoinSomething methods were created, so it is probably a bug.
I have looked in the test project, there is the MULTI_REFtable which has
FKs to the O_INTEGER_PKand P_INTEGER_PKtables, and there it is the same, a
method OIntegerPk.getMultiRefsJoinOIntegerPk() is generated where a
OIntegerPk.getMultiRefsJoinPIntegerPk() method would make more sense.

> - Are there any examples for the equivalent of the old maven-plugin
> id-table-init-sql goal?

Yes, in the test project pom:

> - The generation of OM classes requires a target database to be set. Is
> the generated code actually supposed to be different for different
> databases?

What do you mean by "database".
If the meaning is a different database vendor, then the generated code ist
the same for all vendors.
If the meaning is a different logical name, then the generated code is
different because of the DATABASE_NAMEfield ind the generated peer class.
Or did you mean something else?

I hope this was useful,


To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

View raw message