Skip to content
This repository was archived by the owner on Feb 4, 2022. It is now read-only.

Refactor ViewJson#106

Open
johanjanssens wants to merge 2 commits intomasterfrom
feature/105-json
Open

Refactor ViewJson#106
johanjanssens wants to merge 2 commits intomasterfrom
feature/105-json

Conversation

@johanjanssens
Copy link
Member

resolve #105

- Move text property routing into routable ViewBehaviorRoutable
- Move sparse fields handling into new ModelBehaviorSparsable
- Only set the default model properties when a new row is created
The property might not be present in the data during insert or update. If the behavior is supported always set the property during insert and or update.
@johanjanssens johanjanssens added this to the 3.0.0-beta.2 milestone Jun 2, 2016
@johanjanssens
Copy link
Member Author

@ercanozkaya Can you have a look at this and see if I missed something here?

if($this->getMixer() instanceof DatabaseRowInterface && $this->_auto_generate && !$this->isNew())
{
if($this->hasProperty('uuid') && empty($this->uuid))
if(empty($this->uuid))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this apply if the table has no uuid col?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No the isSupported() method explicitly check if the table has a uuid column. No need to double check it.

@amazeika amazeika modified the milestones: 3.0.0-beta.2, 3.0.0 Nov 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor ViewJSON

4 participants