populse / soma-base

Miscelaneous all-purpose classes and functions
0 stars 3 forks source link

Make class fields read-only #52

Closed sapetnioc closed 10 months ago

sapetnioc commented 10 months ago

Fields defined on class are now supposed to be read-only. As a consequence, it is not possible to use standard API to change their metadata. In order to be able to do this, a class field must first be copied in the instance. This can be done using the controller method writable_field() that behave like field() but in case of class a field, it first copy the field in the instance.

sapetnioc commented 10 months ago

I made this PR on master instead of 3.0