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 "Larry V. Streepy, Jr." <st...@healthlanguage.com> on 2004/01/08 22:38:18 UTC
AXgen and OJB and DDL
I've searched and searched, and I haven't found a clear picture
regarding how to generate the DDL (for table creation) from a
repository.xml. I see that OJB uses Torque internally to construct the
test tables, but they are generated from a schema.xml that appears to
have been hand coded.
I found AXgen which generates numerous artifacts for OJB usage from the
XMI model, but I am left wondering if the DDL that it generates is in
some way certain to meet the needs of OJB.
I was very intrigued by an earlier discussion on this list regarding the
use of commons-sql to generate DDL "diff" files, but the thread seemed
to just die without any real conclusion.
I know this is a somewhat vague request for help, but I want to ensure
that I understand (and can rely on) the mechanisms available for
creating the DDL that OJB will user for it's O/R mappings.
Thanks for any help you can provide.
--
Larry V. Streepy, Jr.
Senior Vice President and CTO
------------------------------------------------------------------------
<http://www.healthlanguage.com/>
"We speak the language of healthcare" ^(TM) Direct: +1 425-373-0600
Fax: +1 425-373-1633
Corp.: +1 303-307-4400
Health Language, Inc.
3950 Lewiston Street, Suite 210
Aurora, Colorado 80011
------------------------------------------------------------------------
The information in this email message is intended only for the use of
the intended recipient and may contain confidential information. Any
unauthorized review, use, disclosure or distribution is strictly
prohibited. If you are not the intended addressee, please promptly
delete this message and notify the sender of the delivery error by
e-mail or you may call Health Language's corporate offices in Aurora,
Colorado USA at (+1) 303-307-4400.
------------------------------------------------------------------------
Re: AXgen and OJB and DDL
Posted by Peter Wieland <pe...@gmx.de>.
> <field-descriptor column="traLockTimestamp" jdbc-type="TIMESTAMP"
name="lockTimestamp"/>
> <field-descriptor column="traLockUser" jdbc-type="VARCHAR"
name="lockUser"/>
> <field-descriptor column="traLastModified" jdbc-type="TIMESTAMP"
name="lastModified"/>
> <field-descriptor column="traLastModifier" jdbc-type="VARCHAR"
name="lastModifier"/>
> Can you explain why they are there? Is there any part of OJB that would
> make use of them? I can see that (if there was an option in AXgen for
> it) the lockTimestamp field could be used for optimistic locking, but
> the other fields appear to be specific to some other use expected by
> AXgen.
You're right, these fields are not required or used directly by OJB. The
lock timestamp and lock user fields were in fact meant to enable optimistic
locking. The last modified and last modifier fields are used quite similar
by the developers to track data modification (via an OJB interceptor). In
fact the templates included in OJB are meant to be examples and it is quite
easy to adopt them to any projects personal needs. So once again, the fields
you describe are not required by OJB. You may either use it at your will,
ignore it or change the templates in which case you would probably need to
provide your own super-interface (replacing
de.armax.base.datasource.AXentity in AXentity.jar).
Regards,
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: AXgen and OJB and DDL
Posted by "Larry V. Streepy, Jr." <st...@healthlanguage.com>.
Thanks Peter, I've got another question regarding the generated
repository_user.xml. It includes fields like the following in every class:
<field-descriptor column="traLockTimestamp" jdbc-type="TIMESTAMP"
name="lockTimestamp"/>
<field-descriptor column="traLockUser" jdbc-type="VARCHAR"
name="lockUser"/>
<field-descriptor column="traLastModified" jdbc-type="TIMESTAMP"
name="lastModified"/>
<field-descriptor column="traLastModifier" jdbc-type="VARCHAR"
name="lastModifier"/>
Can you explain why they are there? Is there any part of OJB that would
make use of them? I can see that (if there was an option in AXgen for
it) the lockTimestamp field could be used for optimistic locking, but
the other fields appear to be specific to some other use expected by AXgen.
Thanks.
Peter Wieland wrote:
>Hi Larry,
>
>I'm not sure wether I can help you but at least I can explain you how AXgen
>makes sure the DDL will meet the needs of OJB. Both, the OJB repository.xml
>and the DDL are generated based on the same UML model (the XMI). The
>templates make sure that the table definitions in the DDL and the
>definitions in the OJB mapping use the same types.
>
>I never tried to generate the DDL from the repository directly as we model
>all of our classes, we never needed such a feature. Modelling entities in a
>case tool and use this model as input for all generation works very well.
>
>Regards,
>
>Peter
>
>
>
>>I've searched and searched, and I haven't found a clear picture
>>regarding how to generate the DDL (for table creation) from a
>>repository.xml. I see that OJB uses Torque internally to construct the
>>test tables, but they are generated from a schema.xml that appears to
>>have been hand coded.
>>
>>
>
>
>
>>I found AXgen which generates numerous artifacts for OJB usage from the
>>XMI model, but I am left wondering if the DDL that it generates is in
>>some way certain to meet the needs of OJB.
>>
>>
>
>
>
>>I was very intrigued by an earlier discussion on this list regarding the
>>use of commons-sql to generate DDL "diff" files, but the thread seemed
>>to just die without any real conclusion.
>>
>>
>
>
>
>>I know this is a somewhat vague request for help, but I want to ensure
>>that I understand (and can rely on) the mechanisms available for
>>creating the DDL that OJB will user for it's O/R mappings.
>>
>>
>
>
>
>>Thanks for any help you can provide.
>>
>>
>
>
>
>>--
>>Larry V. Streepy, Jr.
>>Senior Vice President and CTO
>>------------------------------------------------------------------------
>><http://www.healthlanguage.com/>
>>"We speak the language of healthcare" ^(TM) Direct: +1 425-373-0600
>>Fax: +1 425-373-1633
>>Corp.: +1 303-307-4400
>>
>>
>
>
>
>>Health Language, Inc.
>>3950 Lewiston Street, Suite 210
>>Aurora, Colorado 80011
>>------------------------------------------------------------------------
>>The information in this email message is intended only for the use of
>>the intended recipient and may contain confidential information. Any
>>unauthorized review, use, disclosure or distribution is strictly
>>prohibited. If you are not the intended addressee, please promptly
>>delete this message and notify the sender of the delivery error by
>>e-mail or you may call Health Language's corporate offices in Aurora,
>>Colorado USA at (+1) 303-307-4400.
>>------------------------------------------------------------------------
>>
>>
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>
>
--
Larry V. Streepy, Jr.
Senior Vice President and CTO
------------------------------------------------------------------------
<http://www.healthlanguage.com/>
"We speak the language of healthcare" ^(TM) Direct: +1 425-373-0600
Fax: +1 425-373-1633
Corp.: +1 303-307-4400
Health Language, Inc.
3950 Lewiston Street, Suite 210
Aurora, Colorado 80011
------------------------------------------------------------------------
The information in this email message is intended only for the use of
the intended recipient and may contain confidential information. Any
unauthorized review, use, disclosure or distribution is strictly
prohibited. If you are not the intended addressee, please promptly
delete this message and notify the sender of the delivery error by
e-mail or you may call Health Language's corporate offices in Aurora,
Colorado USA at (+1) 303-307-4400.
------------------------------------------------------------------------
Re: AXgen and OJB and DDL
Posted by Peter Wieland <pe...@gmx.de>.
Hi Larry,
I'm not sure wether I can help you but at least I can explain you how AXgen
makes sure the DDL will meet the needs of OJB. Both, the OJB repository.xml
and the DDL are generated based on the same UML model (the XMI). The
templates make sure that the table definitions in the DDL and the
definitions in the OJB mapping use the same types.
I never tried to generate the DDL from the repository directly as we model
all of our classes, we never needed such a feature. Modelling entities in a
case tool and use this model as input for all generation works very well.
Regards,
Peter
> I've searched and searched, and I haven't found a clear picture
> regarding how to generate the DDL (for table creation) from a
> repository.xml. I see that OJB uses Torque internally to construct the
> test tables, but they are generated from a schema.xml that appears to
> have been hand coded.
> I found AXgen which generates numerous artifacts for OJB usage from the
> XMI model, but I am left wondering if the DDL that it generates is in
> some way certain to meet the needs of OJB.
> I was very intrigued by an earlier discussion on this list regarding the
> use of commons-sql to generate DDL "diff" files, but the thread seemed
> to just die without any real conclusion.
> I know this is a somewhat vague request for help, but I want to ensure
> that I understand (and can rely on) the mechanisms available for
> creating the DDL that OJB will user for it's O/R mappings.
> Thanks for any help you can provide.
> --
> Larry V. Streepy, Jr.
> Senior Vice President and CTO
> ------------------------------------------------------------------------
> <http://www.healthlanguage.com/>
> "We speak the language of healthcare" ^(TM) Direct: +1 425-373-0600
> Fax: +1 425-373-1633
> Corp.: +1 303-307-4400
> Health Language, Inc.
> 3950 Lewiston Street, Suite 210
> Aurora, Colorado 80011
> ------------------------------------------------------------------------
> The information in this email message is intended only for the use of
> the intended recipient and may contain confidential information. Any
> unauthorized review, use, disclosure or distribution is strictly
> prohibited. If you are not the intended addressee, please promptly
> delete this message and notify the sender of the delivery error by
> e-mail or you may call Health Language's corporate offices in Aurora,
> Colorado USA at (+1) 303-307-4400.
> ------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org