Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
I have multiple, separate applications that may insert the same document into the same table at nearly the same moment. I've been able to work around this in testing by hashing a semantic key from a number of fields in the document, but this feels like a hack. I would LIKE to just query to check if a document with the same key exists prior to inserting, but I haven't been able to get this working. Any suggestions?
--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
public class MyDocument{
[UniqueConstraint]
public Tuple<long, string, string> MyUniqueConstraint { get { return new Tuple<long, string, string>(ReleventField1, ReleventField2, ReleventField3); } }
public long RelevantField1 {get;set;}
public string RelevantField2 {get;set;}
public string RelevantField3 {get;set;}
// other fields
}
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.