Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] How to specify attribute 'generated' for property in hibernate mapping via annotation?
[Teneo] How to specify attribute 'generated' for property in hibernate mapping via annotation? [message #606881] Thu, 07 June 2007 07:47
Ilya Klyuchnikov is currently offline Ilya KlyuchnikovFriend
Messages: 74
Registered: July 2009
Member
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=&quot;timestamp&quot;
insertable=&quot;false&quot; updatable=&quot;false&quot;)"/>
</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.
Previous Topic:[teneo] unique/required java annotations
Next Topic:[Teneo] How to specify attribute 'generated' for property in hibernate mapping via annotation?
Goto Forum:
  


Current Time: Fri Apr 26 17:56:41 GMT 2024

Powered by FUDForum. Page generated in 0.03556 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top