agrestio / agrest

Server-side Java REST Framework for easy access to data graphs from various backends
https://agrest.io
Apache License 2.0
80 stars 34 forks source link

Multi-column ObjectMapper #676

Closed andrus closed 2 months ago

andrus commented 2 months ago

Let's provide a version of ObjectMapper (used in UpdateBuilder) that uses more than one property in comparisons. We can piggyback on the existing mapper(..) method, making it a vararg:

AgJaxrs.createOrUpdate(E.class, config)
    .mapper("firstName", "lastName")
    .syncAndSelect(data);