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
Hi all,--
Every call to Math.Random() in a patch script returns the same number.
I'm using Math.Random() to create GUIDs, so I need some unique numbers.
What can I do? Is this to be considered a bug?
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+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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
Hi,I traced this problem to a bug in Jint version 2.4, which RavenDB is still using. It was fixed in 2.4.1 in this commit: https://github.com/mediaclip/jint/commit/a74013b5e66fecd01df1d483823b8766a892db7a.I've attempted to use several of these pseudo-rng libraries but Jint fails to parse them in the ScriptedPatchRequest, giving no error. Have you been successful in including it in a JS patch?Thanks,George