Well, the fact is that you are mixing everything :-)
properties in andromda-cartridge.xml will be accesible from the velocity templates.
properties in andromda-metafacades.xml will be accesible from the java sources of the cartridge.
tagged values within andromda-profile will be accesible throught their "From" name to the java sources of the cartridge.(to be able to change them without changing the classes)
so, for adding a new tagged value, you should be able to simple add it to your model, and then ask in the template through the findTaggedValue method of the object.
Also another way should be to create a new property or method within the hibernate model, which check if the tagged value exists on the element, and then you could access this method through element.yourPorperty. in this case, you should also (to be consistent with the cartridge structure) to create a new element in the hibernate-profile.xml, and then access to the element through it's name. And this of course implies changing the java sources of the cartridge.
values in the andromda-metafacades, should only be there, if you want to assgin a default value for something, that will be checked within the java sources.
Regards
Carlos
Pierre-Yves ROGER wrote:
Hi,
You are probably right, I thought this name shouldn't be the same... But with more reflection the index name is not very repesentatif.
Yes I'm trying to access the tagged value with findTaggedValue, but it's always null.
I'd like know if I all steps in my precedent mail are ok or if there're missing things ?
Thanks PY.
Carlos Cuenca wrote:
Hi Pierre,
first I recommend you to not use a tagged value for this, but a namespace property, since this name should be the same for all the tables, as we are doing for the hibernate "version" field,
on the other hand, you are you trying to access the tagged value?
Carlos
Pierre-Yves ROGER wrote:
Hi,
I'm doing it. But I've got a question :
I need a new tagged value (for the column name of the index) ,
I added my new tagged value in : org.andromda.cartridges.hibernate.HibernateProfile.java
and in : andromda-profile.xml
I also added a property reference in andrometa-metafacades.xml to get a default value.
I add this tagged value in andromda-profile-3.0-RC1-SNAPSHOT.xml.zip
When I try to use this tagged value in my project, andromda get always the default value... :-(
What's wrong in this ?
thanks. PY.
Carlos Cuenca wrote:
Hi,
there is already a request for this at "http://thecla.homeftp.net:8380/jira/browse/HIB-20", but is was not done yet
please fell free to submit a patch for this and we could apply.
Thanks Carlos
Chad Brandon wrote:
Yes, it's possible please submit a JIRA request.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Pierre-Yves
ROGER
Sent: Friday, February 11, 2005 3:41 AM
To: andromda-user@lists.sourceforge.net
Subject: [Andromda-user] Hibernate cartridge and ordered collections : List
Hi,
I have a problem with hibernate cartridge.
In my uml shema, I use an association end with "ordering : ordered" to create a List. Then, andromda generates a List in my entity (instead of a Collection, if I use "ordering : unordered").
But hibernate mapping file is always the same (whatever ordering specification), like this :
<set name=... order-by=...> <key> .... </key> ... </set>
For the "ordering : ordered" , I think this mapping file should have <list> tag instead of <set> and should have an <index> like this :
<list name=... ...> <key> ... </key> <index> .... </index> ... </list>
Is it possible to do it ? thanks.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Andromda-user mailing list Andromda-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/andromda-user
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Andromda-user mailing list Andromda-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/andromda-user
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Andromda-user mailing list Andromda-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/andromda-user