Discussion:
[Middlegen-user] mapping directionality in the ant file (for hibernate)
Dmitri Colebatch
2005-08-03 01:25:23 UTC
Permalink
Hi,

We have a large database schema that is still evolving and so I want
to be able to automate the middlegen step to a level where I can
re-run it after changes are made to the database. My current issue is
that when I start middlegen (specifying no tables) it makes all the
relationships bidirectional. I'd like to control the direction in the
ant task and had thought that the crossref element would be the place
for this, but not knowing the details of middlegen I thought I'd ask
here how other users handle this situation.

any suggestions?

cheers
dim
James Neville
2005-08-03 07:17:17 UTC
Permalink
Post by Dmitri Colebatch
My current issue is
that when I start middlegen (specifying no tables) it makes all the
relationships bidirectional.
I'm no great expert here, but I set this up it in the properties file.

1. Run the middlegen task, so it recognises the new schema.
This will add the attributes for the table to the middlegen properties file.

2. Edit the properties file and set the relations to false.
ie.
relations.employee-company.company-has-employee.enabled=false


3. Run the middlegen task again.


The other option is to use the GUI task and design the mappings in
there, prior to generation.
There is probably some ant element i'm missing too, but i'm not running
against such a big schema that it poses any problem.


Regards,

James.
Dmitri Colebatch
2005-08-03 08:09:39 UTC
Permalink
Thankyou - that sounds like what I want. I didn't realise that it
spits out the properties file. atm I'm using the gui and then
changing the directions using that, but its just not scalable.

cheers
dim
Post by James Neville
Post by Dmitri Colebatch
My current issue is
that when I start middlegen (specifying no tables) it makes all the
relationships bidirectional.
I'm no great expert here, but I set this up it in the properties file.
1. Run the middlegen task, so it recognises the new schema.
This will add the attributes for the table to the middlegen properties file.
2. Edit the properties file and set the relations to false.
ie.
relations.employee-company.company-has-employee.enabled=false
3. Run the middlegen task again.
The other option is to use the GUI task and design the mappings in
there, prior to generation.
There is probably some ant element i'm missing too, but i'm not running
against such a big schema that it poses any problem.
Regards,
James.
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
James Neville
2005-08-03 08:59:15 UTC
Permalink
Post by Dmitri Colebatch
Thankyou - that sounds like what I want. I didn't realise that it
spits out the properties file. atm I'm using the gui and then
changing the directions using that, but its just not scalable.
You're welcome :)

Theres lots of stuff of use in the properties file that I can't seem to
get to through the any task or the GUI.
Maybe theres some extra switches in the more recent versions of the ant
task, but i've not investigated further.

Can anyone else confirm that this is the only way to specify cardinality
etc?

James.
Juan Manuel Sanchez Bel
2005-08-03 09:43:44 UTC
Permalink
I suggest You to use ant's substitution hability to alter the middlegen
generated properties and then pass again middlegen process.

Juanma

-----Mensaje original-----
De: middlegen-user-***@lists.sourceforge.net
[mailto:middlegen-user-***@lists.sourceforge.net]En nombre de James
Neville
Enviado el: miércoles, 03 de agosto de 2005 13:00
Para: middlegen-***@lists.sourceforge.net
Asunto: Re: [Middlegen-user] mapping directionality in the ant file (for
hibernate)
Post by Dmitri Colebatch
Thankyou - that sounds like what I want. I didn't realise that it
spits out the properties file. atm I'm using the gui and then
changing the directions using that, but its just not scalable.
You're welcome :)

Theres lots of stuff of use in the properties file that I can't seem to
get to through the any task or the GUI.
Maybe theres some extra switches in the more recent versions of the ant
task, but i've not investigated further.

Can anyone else confirm that this is the only way to specify cardinality
etc?

James.


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
middlegen-user mailing list
middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user


----------------------------------------------------------------------- Este mensaje y los documentos, que en su caso, lleve anexos, pueden contener informacion confidencial y atañe exclusivamente a las personas a las que va dirigido. Cualquier opinion en el contenida, es exclusiva de su autor y no representa necesariamente la opinion de AZERTIA. Si usted no es el destinatario de este mensaje, considerese advertido de que lo ha recibido por error y que cualquier uso, difusion o copia estan prohibidos legalmente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique por la misma via o al telefono 93 207 55 11 y proceda a destruirlo inmediatamente.

This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of AZERTIA. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify it to AZERTIA by telephone on number +34 93 207 55 11. -----------------------------------------------------------------------
Loading...