Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify upsert to return an entity if a key has been found #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dimitriadamou
Copy link

This is a very simple change where it will search the values of $wheres in Appsero\LaravelDatastore\Query\Builder if a key of instance type \Google\Cloud\Datastore\Key is found, we will then return the Entity from Google Datastore then apply the mutations via values.

This also allows for Laravel Models to be updated via $model->save();

E.g.

   $myModel = MyModel::where("abc", $value)->first();
   $myModel->def = "newValue";
   $myModel->save();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant