I do not know what to do with DatastoreNeedIndexException

7 views
Skip to first unread message

Kenneth Burgos Nivar

unread,
Mar 2, 2013, 11:21:57 AM3/2/13
to siena-...@googlegroups.com
Greetings colleagues, anyone can help me with a DatastoreNeedIndexException

@ Entity
@ Table ("orders")
public class Order extends Model {

@ Id (Generator.AUTO_INCREMENT)
     public Long id;

     @ Column ("fechaEntrada")
@ Index ("fechaEntrada")
     Date fechaEntrada public;

     @ Column ("Customer")
     @ Index ("Customer")
public Customer customer;

     @ Column ("quienRecibe")
     @ Index ("quienRecibe")
     User quienRecibe public;

     @ Column ("responsible")
     @ Index ("responsible")
     User responsible public;

     @ Column ("observation")
     public String observation;

@ Enumerated (EnumType.STRING)
State public status;

     / / @ OneToMany (mappedBy = "order", cascade = CascadeType.ALL)
     @ Column ("teams")
public transient List <Computer> equipment;

AppEngine shows me the following

     kind="ordenes" <datastore-index ancestor="false" source="manual">
         <property name="__key__" direction="desc"/>
     </ datastore-index>

in my datastore-indexes.xml:

<? xml version = "1.0" encoding = "utf-8">
<datastore-indexes autoGenerate="true">
     kind="ordenes" <datastore-index ancestor="false" source="manual">
         direction="desc" name="id" <property />
         direction="desc" name="fechaEntrada" <property />
         direction="desc" name="cliente" <property />
         direction="desc" name="quienRecibe" <property />
         direction="desc" name="responsable" <property />
     </ datastore-index>
</ datastore-indexes>

In AppEngine Datastore Indexes shows me:

Entity Status and Indexes

orders
id , fechaEntrada, customer , quienRecibe responsible
Serving

No longer do because continuous even showing me the following error:
DatastoreNeedIndexException occured:
play.exceptions.JavaExecutionException: no matching index found.
The index for this query Suggested is:
     kind="ordenes" <datastore-index ancestor="false" source="manual">
         <property name="__key__" direction="desc"/>
     </ datastore-index>
Reply all
Reply to author
Forward
0 new messages