Multi-dimension support for Strict Models #46

Closed
opened 2015-03-11 05:03:09 +00:00 by jamie · 2 comments
jamie commented 2015-03-11 05:03:09 +00:00 (Migrated from git.hazaar.io)

Strict models are only a single dimension. This means that if a field is of type 'array' then it's members will not be subject to strict model rules (ie: no data type conversion).

How I see this working is if the 'type' of a field is 'array' then it can have a new argument called, say, 'fields' that will have a sub-field definition. These definitions can be infinitely deep and internally will trigger the creation of a strict model in place of the array.

So to get this to work, I'll need a way to inject a field definition into strict model which will in turn not call the 'init()' method.

Strict models are only a single dimension. This means that if a field is of type 'array' then it's members will not be subject to strict model rules (ie: no data type conversion). How I see this working is if the 'type' of a field is 'array' then it can have a new argument called, say, 'fields' that will have a sub-field definition. These definitions can be infinitely deep and internally will trigger the creation of a strict model in place of the array. So to get this to work, I'll need a way to inject a field definition into strict model which will in turn not call the 'init()' method.
jamie commented 2015-03-11 22:06:23 +00:00 (Migrated from git.hazaar.io)

Support was added in commit:6296c8f9

Support was added in commit:6296c8f9
jamie commented 2015-03-11 22:06:26 +00:00 (Migrated from git.hazaar.io)

Status changed to closed

Status changed to closed
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: hazaar/hazaar-mvc-old#46
No description provided.