Hi Virender,

Virender Singh wrote:
> Hi,
> 
> I am just beginning to use ojb and was wondering what was the best way
> to simplify the task using what's available as of today, September 2002.
>>From what I have read and what I know, this is what I have come up with
> (with obvious and non-obvious gaps). I would welcome any suggestions on
> improving from this group.
> 
> Available before starting:
>   -  Db with table and foreign-key defined [or the torque formatted
> schema.xml]
> 
> To implement OJB:
>   1. generate a repository.xml from the db
>      - for this I used the torque projects "jdbc" target to get me the
> schema.xml file.
>      - I fed this schema file to the xslt as mentioned by Stephan
> Merker's torqueSchema2OJB-instructions.txt (ojb contribs)
>      - this gave me the repository_user.xml file to use but without the
> FK references. 
> 
>       Questions: 
>               - Is there a way to have the FK references autogenerated
> (1:m, m:m relationships could be hand tweaked) ?

I don't know of any...

>               - Is there a way to generate the db from the repository
> file as of today?
> 

try the OJB ant target "forward-db"

> 
>   2. generate a ojb model (value objects for the tables in the db)
>      - for this I used torque's 'ojb-model' target.
>   
>   3. now create the system tables as required by the persistence
> layer/odmg/jdo implementations (repository_internal.xml)
>       Questions:
>               - How do I automatically generate these tables?

there is an ant target "prepare-testdb" that includes the generation of 
the OJB internal tables. It's based on torque.

> 
> Is there a better way to do this stuff?

As there are no better tools right now, you approach seems OK!

cheers,
Thomas

> I am going to be implementing OJB in my application, but haven't yet
> done so.
> 
> Thanks,
> Viru
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> 



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

Reply via email to