I'm using TENEO + hibernate to persist my data and do queries.
So far I was able to cover all my needs by applying JPA annotation in
the eCore and generate the mapping file directly with TENEO.
Do you know if the TENEO annotation supporting creating view instead of
tables (in the mapping file)?
If it doesn't what would be the best way to map the class to a view in a
database.
So if you add a @Table(name='myviewname') it should work.
gr. Martin
Yigal wrote:
> I'm using TENEO + hibernate to persist my data and do queries.
> So far I was able to cover all my needs by applying JPA annotation in
> the eCore and generate the mapping file directly with TENEO.
>
> Do you know if the TENEO annotation supporting creating view instead of
> tables (in the mapping file)?
> If it doesn't what would be the best way to map the class to a view in a
> database.
>
> Thanks
> Yigal
I try to create the database view with following annotations in ecore-file:
@HbEntity
@Subselect("select E_ID from `test`")
@Table(name="TEST_VIEW").
I have an error: org.eclipse.emf.teneo.annotations.parser.AnnotationParserException: No eclass found with name Subselect.
I think that it is normally, there is no @Subselect in support annotations of Teneo.
Which combination of annotation should I use? Please give one example.
Thanks in advance!
Hi MB,
The subselect annotation is not supported by Teneo. You can add a bugzilla to request for it (together with the
synchronize annotation). I hope to spend some time on Teneo this week to solve several open issues.
In the meantime, you can also create a database view directly in the database and then use it as a table in hibernate.
gr. Martin
On 09/30/2013 10:37 PM, M B wrote:
> I try to create the database view with following annotations in ecore-file:
>
> @HbEntity
> @Subselect("select E_ID from `test`")
> @Table(name="TEST_VIEW").
>
> I have an error: org.eclipse.emf.teneo.annotations.parser.AnnotationParserException: No eclass found with name Subselect.
> I think that it is normally, there is no @Subselect in support annotations of Teneo.
>
> Which combination of annotation should I use? Please give one example.
> Thanks in advance!
>