Auto GUID for Entity Primary key Id

By Robert Chanphakeo on 12 Oct 2011
Just like "Is Auto Number" option

Have an "Is Auto UniqueIdentifier" option to automatically generate GUID for entity primary key id.

Goncalo Borrega12 Oct 2011
Can you describe the underlying problem(s) you want to resolve with this solution/capability?
I know some, but would like to understand the real problem
Thanks
Current solution:
  • Created an action <Entity>_Create that takes input parameter <Entity>Record 
  • Created an extension with an action "NewGuid" to  generate a guid value 
  • Assigned primary key value with guid value
Needing to do this for every entity that uses text.guid for the primary key is time consuming.  It would be good to have a Guid function built into the agile platform, and also auto guid option.


Goncalo Borrega12 Oct 2011
What I was trying to understand is under which scenarios would you like to use Guid primary keys for?
Integration motives? Easier data synchronization between servers? Something else?
[I replied with a long explaination describing our use case, but the session timed out]


In short...we are using GUID for our cloud based application, to solve two problems

-Get around the int limitation (we host many companies data and customers data under a single cloud platform)
-Cover future requirement: able to generate guid offline, for POS desktop app and merge data with cloud platform.



When an entity primary key identifier is set to "text" by default scaffolding (intelliwrap) is to set the primary key to use GUID.

Who manually enters primary key identifiers anyways? 


Merged from '[ServiceStudio] Entity identifiers set with "Text" datatype, should use GUID identifier by default scaffolding' (idea created on 2015-01-14 22:35:45 by Robert Chanphakeo), on 2016-03-14 17:21:16 by Goncalo Borrega
Note: When a primary key/identifier is set to varchar/text, and you use "scaffolding", scaffolding creates a input textfield widget, and assumes someone will be entering a primary key manually, but in most cases everyone that sets the primary key/identifier of an entity to "text" they want to use GUID rather than enter the primary key/identifier manually!



Merged from '[ServiceStudio] Entity identifiers set with "Text" datatype, should use GUID identifier by default scaffolding' (idea created on 2015-01-14 22:35:45 by Robert Chanphakeo), on 2016-03-14 17:21:16 by Goncalo Borrega
Carlos Henriques24 May 2012
Outsystems needs native support for the uniqueidentifier data type.

We should be able to create attributes with uniqueidentifier data type, and have a system function to create new GUID's.

http://msdn.microsoft.com/en-us/library/ms187942.aspx

Merged from 'Native support for UNIQUEIDENTIFIER data type' (idea created on 2012-05-24 14:40:50 by Carlos Henriques), on 2016-03-14 17:21:34 by Goncalo Borrega
Kilian Hekhuis29 May 2012
Soes Oracle have a similar data type?

Merged from 'Native support for UNIQUEIDENTIFIER data type' (idea created on 2012-05-24 14:40:50 by Carlos Henriques), on 2016-03-14 17:21:34 by Goncalo Borrega
Carlos Henriques29 May 2012
No. But it can be done with a RAW column and the SYS_GUID function:

http://docs.oracle.com/cd/B14117_01/server.101/b10759/functions153.htm




Merged from 'Native support for UNIQUEIDENTIFIER data type' (idea created on 2012-05-24 14:40:50 by Carlos Henriques), on 2016-03-14 17:21:34 by Goncalo Borrega
See GUID discussion here http://www.outsystems.com/forums/discussion/13832/entity-with-guid-primary-key-identifier/

Merged from 'Native support for UNIQUEIDENTIFIER data type' (idea created on 2012-05-24 14:40:50 by Carlos Henriques), on 2016-03-14 17:21:34 by Goncalo Borrega
Rather than using auto inc ID's, provide an option to auto gen a GUID.  This makes moving data from enviroment databases possible.

Merged from 'Support for autogenerated GUID's' (idea created on 2016-03-11 17:37:45 by Warren Strong), on 2016-03-14 17:22:01 by Goncalo Borrega
Should be merged with:

http://www.outsystems.com/ideas/1830/servicestudio-entity-identifiers-set-with-text-datatype-should-use-guid-iden

http://www.outsystems.com/ideas/935/auto-guid-for-entity-primary-key-id

http://www.outsystems.com/ideas/1137/native-support-for-uniqueidentifier-data-type

J.Ja

Merged from 'Support for autogenerated GUID's' (idea created on 2016-03-11 17:37:45 by Warren Strong), on 2016-03-14 17:22:01 by Goncalo Borrega