Hi,
I am trying to create some index in a DB - but I get an exception when i try to commit.
Exception in thread "main" [ObjectDB 2.6.0_01] javax.persistence.PersistenceException Invalid index path 'tStamp.value / instrumentId' in type Entities.OBN (error 328) at com.objectdb.jpa.EMImpl.createQuery(EMImpl.java:958)
Here is how the class of the persisted object looks like
@Entity @Index(members={"tStamp.value", "instrumentId"}) public class OBN implements Serializable{ private static final long serialVersionUID = 998L; @Id @GeneratedValue long id; @Index private Long instrumentId; private SafeLong tStamp;
The SafeLong class is a very simple wrapper of a long -
@Embeddable public class SafeLong implements Serializable, Comparable<SafeLong>{ public long value;
According to the doc - what i am doing is not allowed - but i don't see why it is not possible as my SafeLong class is just a simple wrapper.
Multi part paths in a composite index must have the same length. Therefore, the following index definition is invalid: @Entity @Index(members={"lastName", "address.city"}) // INVALID public class Employee { String firstName; String lastName; Address address; : }
Thanks
EKK