cubicweb #2414591 [schema] default values handling [validation pending]

Default attribute values are stored as unicode strings in db.

This makes impossible ( through you learn it by trial, error, and source code analysis ) to use default values for Bytes (at least). (Didn't check with numbers. Might work because of various hackeries (such as looking at the schema at the right time)).

Quite annoying.


class CWAttribute(EntityType):
61 """define a final relation: link a final relation type from a non final
62 entity to a final entity type.
64 used to build the instance schema
65 """
86 defaultval = String(maxsize=256)

What should be done:

* use a Bytes field for defaultval
* store the gziped-pickled, or json-serialized default object
* remove the hackeries in the code

done in3.18.0
load left0.000
closed by#c5eed908117d [schema] store default attribute values in a Bytes field, allowing python objects as default values
patchImprove default value storage [applied]