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 #85708] Thu, 07 June 2007 07:47 Go to next message
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.
Re: [Teneo] How to specify attribute 'generated' for property in hibernate mapping via annotation? [message #85723 is a reply to message #85708] Thu, 07 June 2007 08:25 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
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=&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.


--

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
Re: [Teneo] How to specify attribute 'generated' for property in hibernate mapping via annotation? [message #85738 is a reply to message #85723] Thu, 07 June 2007 12:31 Go to previous message
Ilya Klyuchnikov is currently offline Ilya KlyuchnikovFriend
Messages: 74
Registered: July 2009
Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=191463

Martin Taal wrote:
> 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=&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.
>
>
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 08:25 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
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=&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.


--

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
Re: [Teneo] How to specify attribute 'generated' for property in hibernate mapping via annotation? [message #606883 is a reply to message #85723] Thu, 07 June 2007 12:31 Go to previous message
Ilya Klyuchnikov is currently offline Ilya KlyuchnikovFriend
Messages: 74
Registered: July 2009
Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=191463

Martin Taal wrote:
> 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=&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] How to specify attribute 'generated' for property in hibernate mapping via annotation?
Next Topic:[teneo] unique/required java annotations
Goto Forum:
  


Current Time: Thu Apr 25 05:47:13 GMT 2024

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

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

Back to the top