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

ENH: JsonContext accepts a bean as target #2617

Merged
merged 1 commit into from
Mar 28, 2022

Conversation

rPraml
Copy link
Contributor

@rPraml rPraml commented Mar 28, 2022

We have the following use case, that we have a json string and we want to apply this to a given bean.

e.g.
customer = DB.find(Customer.class, 1);
json={"name":"Roland"}

Now we want to apply this JSON to the customer and save it again.

This extends the JsonContext with toBean(target, json) method, where target could be an instance instead of a class.

cheers
Roland

@rbygrave
Copy link
Member

Nice !!

@rbygrave rbygrave added this to the 12.16.1 milestone Mar 28, 2022
@rbygrave rbygrave changed the title JsonContext accepts a bean as target ENH: JsonContext accepts a bean as target Mar 28, 2022
@rbygrave rbygrave merged commit 3e4d7c9 into ebean-orm:master Mar 28, 2022
@rPraml rPraml deleted the json-update-existing branch January 23, 2023 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants