Artur Z wrote:

hello

(I'm newcomer to OJB)

currently I'm using torque in my application development (which is about 50% finished)
so far it has 44 database tables

I found that OJB is a more sophisticated and advanced tool
is there any way to move from torque to OJB without much pain ?
(any tips/trick/ideas?)


Mhm, Torque is in some regards the opposite of OJB. In Torque you create Java source for your database schema (including persistence code). In OJB, you map (existing) Java classes to a database schema. And of course you can use the two with each other (and this makes sense).
I'm not that familiar with Torque, so I don't know whether there is the ability in Torque to generate OJB code (as opposed to for instance plain SQL).


The main migration work will be the creation of the model file for your java classes (repository.xml) that states how they are mapped onto the tables. There are a couple of tutorials on the OJB site that explain this, and of course feel free to ask on the user maling list.
And you also have to remove the persistence code from you classes (if Torque did not create DAO's in the first place in which case this will be even easier) and replace it with OJB handling.


I ask because they are both jackarta/db projects i maybe they have something in common, etc.
should I consider that kind of action or it is difficult and could couse many, many bugs ?


Considering the number of tables that you have, it might involve a fair bit of work. IMO you should try with a small sample first to see whether OJB works for you.

Tom


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to