You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Hans Novak <hn...@repcom.de> on 2008/04/30 14:16:59 UTC

Database Update

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: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Database Update

Posted by Hans Novak <hn...@repcom.de>.
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: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Database Update

Posted by Armin Waibel <ar...@apache.org>.
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: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 

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


ojb do not store

Posted by Hans Novak <hn...@repcom.de>.
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: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org