Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Re: [teneo] Issues adding additional indexes to my entity using @Index
Re: [teneo] Issues adding additional indexes to my entity using @Index [message #502034] Fri, 04 December 2009 20:38
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi lemao,
Hibernate does not add indexes when updating an existing schema (at least not afaik).
It is strange though that the index is not added when recreating the complete schema. I would try to enable hbm2ddl
logging to see more details.
See here:
http://www.elver.org/hibernate/troubleshooting.html#runtime

My experience is that if the rdb schema create statements fail that hibernate will still continue/startup. So it is easy
to miss them.

Btw, support for Teneo is given on the main EMF newsgroup which I added as cc.

gr. Martin

Lemao wrote:
> I am having some difficulties adding additional indexes to my tables
> using Teneo+Hibernate. I followed the documentation and added an
> annotation to the structural feature I want indexed:
> @Index(name="myindex")
>
> I see that the generated hibernate file contains the index attribute but
> my table doesnt contain the additional index (myindex). Here is the
> Hibernate property mapping generated by Teneo:
>
> <property name="mycol" lazy="false" insert="true" update="true"
> not-null="false" unique="false" type="java.lang.String"
> index="mytable_mycol_index">
> <column not-null="false" unique="false" name="`mycol`"
> index="mytable_mycol_index"/>
> </property>
>
> I also dropped the whole db to have Hibernate recreated the tables from
> scratch in MySQL but I cant seem to get the index automatically created.
>
> Any ideas?
>
> thanks in advance,


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
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
Previous Topic:[teneo] versions?
Next Topic:"EMF Model" missing from New wizard
Goto Forum:
  


Current Time: Fri Mar 29 04:38:33 GMT 2024

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

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

Back to the top