Unique Id

77 views
Skip to first unread message

yfc204

unread,
Feb 11, 2011, 11:55:05 AM2/11/11
to persistence.js
Hi

I am working on a project which involves creating multiple entities
under 1 domain. I am wondering if ids for cross all entities under
that domain unique?

Zef Hemel

unread,
Feb 11, 2011, 12:24:51 PM2/11/11
to persis...@googlegroups.com
ids are randomly generated, essentially GUIDs. So you're pretty much safe.

Zef

--
Zef Hemel
http://zef.me
http://twitter.com/zef

David Eduardo Rearte

unread,
Mar 3, 2014, 6:55:54 PM3/3/14
to persis...@googlegroups.com
Hi Zef,

 The uuid are randomly generated. I understand that this is for the portability of data between different databases... but, ¿this uuid have chances of repeat?  ¿did you know other reason for use uuid?

 Sory but the bad english :P

 David

Zef Hemel

unread,
Mar 4, 2014, 2:20:43 AM3/4/14
to persis...@googlegroups.com
There is a chance of generating the same UUID again, but it's pretty astronomical. The reason for choosing UUIDs is to enable sync between disconnected databases and it simplifies persistence.js' implementation quiet a bit too.

-- Zef


--
You received this message because you are subscribed to the Google Groups "persistence.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to persistencej...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

David Eduardo Rearte

unread,
Mar 4, 2014, 9:45:06 AM3/4/14
to persis...@googlegroups.com, z...@zef.me
You right, 

  This ORM is awesome and thanks for the long time support!

  Only for curiosity, would be too much problem change the code to convert from the uuid to incremental functionality? What files i should change?

        David.
Reply all
Reply to author
Forward
0 new messages