Hey Martin,

-----Forwarded Message-----
From: Martin West <[EMAIL PROTECTED]>
To: Saltarin Pierre <[EMAIL PROTECTED]>
Subject: Re: RE : RE : RE : [Andromda-user] How to processinheritanceinHibernateEntity.vsl
Date: Tue, 31 Aug 2004 09:59:41 +0100
There appears to be a gap in the documentation, although the code
(EntityFacadeLogicImpl) has logic to support defaultIdentifier,
defaultIdentifierType and defaultIdentiiferVisibilty only
defaultidentifierType is documented at
http://team.andromda.org/docs/andromda-hibernate-cartridge/namespace.html
defaultIdentifier allows you to override the "id" name. To override try
adding
<property name="defaultIdentifier" value="myId"/>
In the hibernate namespace section of the mda/build.xml if you are using
ant.
Chad, is my supposition correct? If so Ill add to jira if you wish.
btw The phrase "its not what Andromda can do for but what can you do for
andromda" springs to mind, iro recent appends.


:)

-- Actually we do have it documented, its just been moved to the UML metafacades docs(since any cartridge metafacade inheriting from EntityFacade could use it, i.e. cartridge metafacdaes): http://team.andromda.org/docs/andromda-metafacades-uml/namespace.html

-- Thanks Martin!

-- Chad


On Fri, 2004-08-27 at 13:46, Martin West wrote:
Not sure I quite follow your logic, andromda generates for a default
primary key of "id".

You could modify the HibernateEntity.vsl or HibernateEntityImpl.vsl that
add getters and setters idH which wrap the id attribute.


On Fri, 2004-08-27 at 13:24, Saltarin Pierre wrote:
> I have noticed that in my model I need an attribute on each class that > owns the "PrimaryKey" stereotype.
> For our development framework, using Hibernate, we have define this > Hibernate Primary Key as idH.
> What appends is that the person in charge of the business modelization > would like not have to define this "technical" attribute in the model.
>
> So I would like to adapt the HibernateEntity.vsl so it adds > automatically this idH property in my generated classes.
>
> Right know if I do remove my "PrimaryKey" attribute from xmi files, the > AndroMDA build task failed. What I found logic.
>
> I would like to know where to concentrate my work to enables this > automatisation.
>
> Once again thank you for everything.
>
> B.R.
>
> Pierre Saltarin
>
>
> -----Message d'origine-----
> De : Martin West [mailto:[EMAIL PROTECTED]
> EnvoyÃÂ : vendredi, 27. aoÃÂt 2004 14:05
> Ãâ : Saltarin Pierre
> Objet : Re: RE : RE : [Andromda-user] How to > processinheritanceinHibernateEntity.vsl
>
> Can you explain in more detail what you want to do with Primary Key?
>
> On Fri, 2004-08-27 at 10:17, Saltarin Pierre wrote:
> > Thanks for everything; I succeeded to have almost what I wanted.
> > Inheritance seems to be generated properly.
> >
> > By the way, we have our model in Rational Rose. To use AndroMDA for > > mapping generation we use Poseidon to transform the .mdl into a valid > > XMI. Do you know if it is possible to use Rational Rose xmi directly. > > Six month ago it was not possible.
> >
> > To finish with, for Hibernate, we need an attribute which stereotype > > is Primary Key. If I don't want to put it in my .xmi file, is it > > possible to and/or write a new cartridge for that.
> >
> > Once more thanks a lot for everything
> >
> > Pierre
> >
> >
> > -----Message d'origine-----
> > De : Martin West [mailto:[EMAIL PROTECTED]
> > EnvoyÃÂ : mercredi, 25. aoÃÂt 2004 11:40
> > Ãâ : Saltarin Pierre
> > Cc : Andromda User
> > Objet : Re: RE : [Andromda-user] How to process > > inheritanceinHibernateEntity.vsl
> >
> > I was already on an early version of M2 and moving to the released
> > version was fairly straight forward. Search this forum for reports on
> > migration, it seems to be fairly painless.
> >
> > I vaguely remember a problem like this but dont recall the specifics.
> >
> > The problem would appear to be in the xdoclet processing.
> >
> > In your hibernate/sar/build.xml do you have
> >
> > <hibernate version="2.0" />
> >
> > in the hibernatedoclet tag
> >
> > It will be a lot easier if you migrated to the released 3.0M2.
> >
> > On Wed, 2004-08-25 at 10:22, Saltarin Pierre wrote:
> > > Thanks for replying,
> > >
> > > Well I am using 3.0M1, my .xmi file comes from Poseidon 2.5.
> > >
> > > My java files contain the tag you mentioned
> > > * @hibernate.subclass
> > > * discriminator-value="Animal"
> > >
> > > No errors appear in the console nor the andromeda-hibernate.log.
> > >
> > > Is it a big job to move from 3.0M1 to 3.0M2 ?
> > >
> > > Thanks a lot,
> > >
> > > BR
> > >
> > > Pierre
> > >
> > >
> > > -----Message d'origine-----
> > > De : Martin West [mailto:[EMAIL PROTECTED]
> > > EnvoyÃÂ : mercredi, 25. aoÃÂt 2004 11:06
> > > Ãâ : Saltarin Pierre
> > > Cc : Andromda User
> > > Objet : Re: [Andromda-user] How to process inheritance > > > inHibernateEntity.vsl
> > >
> > > Which version of Andromda are you using?
> > >
> > > I am using 3.0M2 and it generates fine.
> > >
> > > Are there any error messages in the console log or
> > > andromda-hibernate.log?
> > >
> > > Do Cat and Dog .java contain the @hibernate.subclass tags?
> > >
> > >
> > > On Wed, 2004-08-25 at 09:57, Saltarin Pierre wrote:
> > > > Hello,
> > > >
> > > >
> > > >
> > > > I am trying to generate my hibernate mapping flies from a poseidon
> > > > model.
> > > >
> > > >
> > > >
> > > > I would like to know how I can modify my vsl file so it generates > > > > the
> > > > proper hbm.xml file from my model.
> > > >
> > > >
> > > >
> > > > What I have is 2 classes CAT and DOG that inherit from an ANIMAL
> > > > class.
> > > >
> > > >
> > > >
> > > > The cat.java, dog.java and animal.java classes are correctly
> > > > generated.
> > > >
> > > >
> > > >
> > > > The animal.hbm.xml is generated and cat.hbm.xml, dog.hbm.xml files > > > > are
> > > > not which is correct.
> > > >
> > > >
> > > >
> > > > Unfortunately animal.hbm.xml doesn't containt any <subclass .../> > > > > tag.
> > > >
> > > >
> > > >
> > > > What I would like to know is how to get the subclasses from $class > > > > in
> > > > my HibernateEntity.vsl file.
> > > >
> > > >
> > > >
> > > > Thanks in advance,
> > > >
> > > >
> > > >
> > > > Pierre
--
Martin West
Head of Product Design and Development
http://www.star-map.net
+44(0)207 318 0308
+44(0)787 968 0096





------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ Andromda-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to