ensureIndexes call fails if the entity class has a reference to self

18 views
Skip to first unread message

Rajesh Koilpillai

unread,
Nov 30, 2010, 12:32:13 PM11/30/10
to Morphia
DS.ensureIndexes fails for the following entity class, I am able to
persist records if I comment out the ensureIndexes call. Is this a
bug?

@Entity("C")
public class C {

@Id
private String id;

private String name;

@Reference
private C parent;

public C() {
super();
}
...
}

java.lang.StackOverflowError
at java.util.ArrayList.get(ArrayList.java:322)
at java.util.AbstractList$Itr.next(AbstractList.java:345)
at
com.google.code.morphia.DatastoreImpl.ensureIndexes(DatastoreImpl.java:
293)
at
com.google.code.morphia.DatastoreImpl.ensureIndexes(DatastoreImpl.java:
313)
at
com.google.code.morphia.DatastoreImpl.ensureIndexes(DatastoreImpl.java:
313)

Scott Hernandez

unread,
Nov 30, 2010, 12:33:33 PM11/30/10
to mor...@googlegroups.com
Please upgrade to Morphia 0.9.7.1, or the latest snapshot.

Rajesh Koilpillai

unread,
Nov 30, 2010, 1:14:26 PM11/30/10
to Morphia
Works fine on 0.97.1 - Thanks very much

On Nov 30, 10:33 pm, Scott Hernandez <scotthernan...@gmail.com> wrote:
> Please upgrade to Morphia 0.9.7.1, or the latest snapshot.
>
> On Tue, Nov 30, 2010 at 9:32 AM, Rajesh Koilpillai
>
Reply all
Reply to author
Forward
0 new messages