UUID type has an illegal default value
Defining an entity property of type UUID throws the following exception during entity creation:
java.lang.IllegalArgumentException: Invalid UUID string:
This is because the default value for UUIDs is
UUIDFromString("")
, but the empty string is not a valid UUID. Changing the default value torandomUUID()
works. In case the default value is not supposed to be random it can also be changed into a fixed value ofUUIDFromString("00000000-0000-0000-0000-000000000000")
. The default value can be changed in ruletype-default-value
in/src/org/webdsl/dsl/modules/types/UUID.str
Example:
Submitted by Christoffer Gersen on 18 December 2012 at 15:06application test entity Ent { prop :: UUID } page root() { var e := Ent{}; }
Issue Log
On 18 December 2012 at 15:14 Christoffer Gersen commented:
Using
randomUUID()
as default in r5578.
On 18 December 2012 at 15:14 Christoffer Gersen closed this issue.
Log in to post comments