WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org
View all threadsHi all,
The title says almost all.
Declaring a field in the Service layer as follow,
<xs:element name="scalarValuesComputed" type="xs:boolean"/>
… this field will be then turned to a column in the database.
Is it possible to assign a default value for this column through the Service layer declaration?
Something like:
<xs:element name="scalarValuesComputed" type="xs:boolean" default=”true”/>
Thank you by advance for your help and have a nice day.
Best regards,
Sébastien
Hi Sébastien,
AFAIK, declaring a default value for a field is only done in the
application layer as this is the layer where field types are declared and
term lists are enumerated. It seems plausible that a boolean type field
could be given a default value in the services layer since a
(non-repeating) boolean is guaranteed to have only one of two values,
whereas any other field with attribute type="xs:string" could be a variety
of field types (and values) depending on tenant configuration and scope.
Nonetheless, adding a default value to a field, say boolean, in the
application layer configuration would look like this example Ray Lee shared
a few months back*:
Hope this helps,
On Mon, Feb 25, 2013 at 7:57 AM, Sébastien Brossard <
Sebastien.Brossard@smk.dk> wrote:
Hi all,****
The title says almost all.****
Declaring a field in the Service layer as follow, ****
<xs:element name="scalarValuesComputed" type="xs:boolean"/>
… this field will be then turned to a column in the database.****
Is it possible to assign a default value for this column through the
Service layer declaration? ****
Something like:****
<xs:element name="scalarValuesComputed" type="xs:boolean" default=”true”
/>
Thank you by advance for your help and have a nice day.****
Best regards,****
Sébastien****
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org