Quantcast

Database Update

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Database Update

repcom
Hi,

how can i update the Database, if i change my Java-sourcecode and with
that the database structure, without loosing any data.
Until now i use the mysql command to import the SQL-Ascii File, created
from OJB with ant.
But this deletes first all tables.

Hans

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Database Update

Armin Waibel
Hi Hans,

Hans Novak wrote:
> Hi,
>
> how can i update the Database, if i change my Java-sourcecode and with
> that the database structure, without loosing any data.
> Until now i use the mysql command to import the SQL-Ascii File, created
> from OJB with ant.
> But this deletes first all tables.

The upcoming version of OJB 1.0.5 use DdlUtils instead of Torque to
generate the tables of the unit tests. DdlUtils supports alteration of
tables - maybe this can help to solve your problem.

http://db.apache.org/ddlutils/documentation.html

regards,
Armin

>
> Hans
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ojb do not store

repcom
In reply to this post by repcom
Hi,

i have found a lot of problems with ojb, if i try this:

/**
 * @ojb.class table = "PRODUCT_STOCK"
 * @DOC this is a description
 */
public class ProductStock

the "@DOC" statement cant be there, because the ant script does it not
recognize.
However, this i can solve self, but another problem is, that if i have
in my code a

@ojb.reference ....

it must be before a

@ojb.collection

because it will also not recognized.
Can someone tell me why ?

My code is very big and now some Collections of an object will not be
saved.
If i sysout the object before save - everything is fine, after save and
relaod from databes all collections are empty.
(in the database too)
I get no error with ant script, the corosponding SQL Code for the
database looks good, every referencens are available.

Is there a general Problem with large ojb projects ?

Hans



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Database Update

repcom
In reply to this post by Armin Waibel
Armin Waibel schrieb:

>
>>
>> how can i update the Database, if i change my Java-sourcecode and
>> with that the database structure, without loosing any data.
>> Until now i use the mysql command to import the SQL-Ascii File,
>> created from OJB with ant.
>> But this deletes first all tables.
>
> The upcoming version of OJB 1.0.5 use DdlUtils instead of Torque to
> generate the tables of the unit tests. DdlUtils supports alteration of
> tables - maybe this can help to solve your problem.
>
> http://db.apache.org/ddlutils/documentation.html

When will it released ?

Hans

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...