|
|
|
Re: [Teneo] How to specify attribute 'generated' for property in hibernate mapping via annotation? [message #606882 is a reply to message #85708] |
Thu, 07 June 2007 04:25  |
Eclipse User |
|
|
|
Yes please enter a enhancement request for this.
gr. Martin
Ilya Klyuchnikov wrote:
> In my model there is a class that has attribute "modified":
>
>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="modified"
> unique="false"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EDate">
> <eAnnotations source="teneo.jpa">
> <details key="appinfo" value="@Temporal(TIMESTAMP)"/>
> </eAnnotations>
> <eAnnotations source="teneo.jpa">
> <details key="appinfo"
> value="@Column(columnDefinition="timestamp"
> insertable="false" updatable="false")"/>
> </eAnnotations>
> </eStructuralFeatures>
>
> So in hibernate mapping generated by Teneo I have:
>
> <property name="modified" lazy="false" insert="false"
> update="false" not-null="false" unique="false" type="timestamp">
> <column not-null="false" unique="false" name="`modified`"
> sql-type="timestamp"/>
> </property>
>
> It is populated on insert/update with the current timestamp according to
> http://www.hibernate.org/hib_docs/v3/reference/en/html/mappi ng.html#mapping-generated
>
>
> But I want hibernate to reread this property on insert/update to have
> the actual value in UI.
>
> To do this I need to specify generated="always" for this property in
> hibernate mapping according to
> http://www.hibernate.org/hib_docs/v3/reference/en/html/mappi ng.html#mapping-declaration-property
>
>
> But I see no way to do it via annotations in ecore file - via jpa or
> hibernate annotation. To edit generated mapping manually is not
> convenient. Could I request enhancement for Teneo to do it?
>
> Thanks.
>
> Ilya.
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
|
Powered by
FUDForum. Page generated in 0.03576 seconds