You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Brendan Miller <bm...@dotster.com> on 2007/02/01 17:22:51 UTC
Namespace (packageName) by table within schema?
We would like to create a schema with the Torque classes generated in
different namespaces for particular tables. Some tables would be in the
same namespace, but some would be different. And sometimes there will
be foreign keys from one table to another table that is in a different
package.
The "packageName" attribute is only database-level, and if I carve my
schema into a bunch of smaller, namespace-schemas, then the foreign keys
do not work because the generator can't "see" them.
Has anyone else tried to do this, and how might this be achieved.
Brendan
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
RE: Namespace (packageName) by table within schema?
Posted by Thomas Fischer <fi...@seitenbau.net>.
What you could try to do is to create one schema.xml for every package and
use the external-schema xml tag. See one of the schemata of the test
project at
http://svn.apache.org/viewvc/db/torque/test/trunk/test-project/src/schema/test-schema.xml?revision=475476&view=markup
(the @something@ variables are filtered before the schema is used).
I think this should work, but I have not tried it.
Thomas
"Brendan Miller" <bm...@dotster.com> schrieb am 01.02.2007 17:22:51:
>
> We would like to create a schema with the Torque classes generated in
> different namespaces for particular tables. Some tables would be in the
> same namespace, but some would be different. And sometimes there will
> be foreign keys from one table to another table that is in a different
> package.
>
> The "packageName" attribute is only database-level, and if I carve my
> schema into a bunch of smaller, namespace-schemas, then the foreign keys
> do not work because the generator can't "see" them.
>
> Has anyone else tried to do this, and how might this be achieved.
>
> Brendan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org