j***@gmail.com
2018-04-05 17:37:15 UTC
Hi,
I have created a DAO class where I'm using @CompoundIndexes to avoid
duplicates into my DB but still the entries are being populated. Any idea
about how we can avoid it?
Example class:
@Document(collection = "ABC")
@CompoundIndexes({
@CompoundIndex(def = "{'A.B.x':1, 'A.B.y':1}", name =
"compound_index_1"),
@CompoundIndex(def = "{'A.C.k':1, 'A.C.l':1}", name = "compound_index_2")
})
public class XXX{
private A a;
private String dateOfEntry;
private String dateOfUpdate;
}
class A {
private B b;
private C c;
private string status;
}
class B {
private string x;
private string y;
}
class C{
private string k;
private string l;
private string m;
}
I have created a DAO class where I'm using @CompoundIndexes to avoid
duplicates into my DB but still the entries are being populated. Any idea
about how we can avoid it?
Example class:
@Document(collection = "ABC")
@CompoundIndexes({
@CompoundIndex(def = "{'A.B.x':1, 'A.B.y':1}", name =
"compound_index_1"),
@CompoundIndex(def = "{'A.C.k':1, 'A.C.l':1}", name = "compound_index_2")
})
public class XXX{
private A a;
private String dateOfEntry;
private String dateOfUpdate;
}
class A {
private B b;
private C c;
private string status;
}
class B {
private string x;
private string y;
}
class C{
private string k;
private string l;
private string m;
}
--
You received this message because you are subscribed to the Google Groups "mongodb-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-dev+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-dev/d71d5579-7212-42fb-afd1-728e41b243e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "mongodb-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-dev+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-dev/d71d5579-7212-42fb-afd1-728e41b243e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.