db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivano Luberti <lube...@archicoop.it>
Subject Re: newbie and generator rewriting
Date Fri, 12 Feb 2010 09:11:16 GMT
I'm guessing if this difference in view come from different experience
or is a matter of skills.

Other comments follow:

Thomas Fischer ha scritto:
> Forgive me, but personally I think reverse engineering from the database is
> an inherent pain. You tend to loose important information, e.g.foreign key
> relation (at least using Mysql's MyIsam tables, not so sure for other DBs).
> Also, reverse type mapping can be difficult. In simple cases, you can guess
> the Java type automatically, but you will never get the Torque types
> booleanchar and booleanint back from the DB. And types might be different
> for every supported database. Getting ranges is difficult(can one determine
> that a column is varchar(134) or number(10,2) ? No idea.)
> Then, there's default value, no idea if you get that back. And so on. My
> energy is too limited for this wide field.
I have used Torque with postgres and foreign key are supported by
reverse engineering.
More generally I had no issue with data type.
I had some with MySQL, but I consider that server running quickly to
decline (not saying Torque should ceas support, just expressing an
opinion here).
On the contrary using some specific type like booleanchar or booleanint
would let me wonder what is going to happen in the db. And I should
explain it to my DB guys that work on writing triggers and db functions

> The feeling between the Torque developers was that the reverse engineered
> file serves as starting point but must be tweaked manually afterwards. But
> I'm happy to be proven wrong....
In this case another field were the project should improve is
documentation about the XML format and how to use that.

>> The sql->xml is also useful when you change the db and you want to
>> regenerate the torque classes. How you do that: do you manipulate
>> manually the XML ?
> Yes, and create the alter table script manually. Altering an existing
> database requires good thinking and testing anyway most of the cases, so
> handcoding the SQL is the smallest part.
Not sure about "the smallest part" another advantage to make changes
directly in the db is that you prevent data loosing in most cases
(adding column, changinng names.......)
> Only those two :-) But the old generator is strongly tied to ant which is
> quite pointless for the maven part. It is not a big problem, but the code
> is more complicated and heavy than it has to be.
> In my eyes, the better architecture is to provide the functionality in
> plain java (build-system-agnostic) and provide adapters for the different
> build systems.
No doubt.

dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
web: www.archicoop.it

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

View raw message