sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brendan Robert <brob...@adobe.com.INVALID>
Subject RE: Sling Models feature proposal: Adding transparent persistence support
Date Mon, 24 Jun 2019 19:15:58 GMT
I agree that autosave might make a large performance improvement for large operations, but
I feel like that would require some kind of overseer to make any automatic behavior work correctly.
 A fair compromise would be to add an optional call to specify autocommit as an optional Boolean
(with the default value being true because a lot of times this will be used for a single record.)
 Anyone using the autocommit = false assumes the responsibility of committing changes.   If
we’re saying the same thing then great, I’ll open a new issue for that so the effort is
tracked against that.  I’m concerned about some edge cases making this a little tricky,
but I’ll save my breath for Jira. 😃



-Brendan



Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10



________________________________
From: Nicolas Peltier <npeltier@apache.org>
Sent: Monday, June 3, 2019 6:54:36 AM
To: dev@sling.apache.org
Subject: Re: Sling Models feature proposal: Adding transparent persistence support

Hi Brendan,

this is great! I agree with Carsten's feedback in the ticket that we should
stick in the naming and in the code (RepositoryException e.g.) to the
resource persistence layer.
Also, i would find interesting to have an option to defer the commit to an
upper layer, in case you have many "persist" operations in a row, this
would be suboptimal. Something like an autosave flag.

Le lun. 3 juin 2019 à 12:12, Brendan Robert <brobert@adobe.com.invalid> a
écrit :

> I have submitted a new module for consideration which adds a new
> persistence service.  This service allows saving a java bean back to the
> JCR.  This allows sling models to be 2-way model beans, useful for all
> kinds of business logic automation and integration scenarios.
>
> For more information and the donated code including unit test coverage,
> see the jira issue SLING-8450.
>
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FSLING-8450&amp;data=02%7C01%7Cbrobert%40adobe.com%7Cc0b10f64222d4ac9f10808d6e81a47b6%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C636951596924516808&amp;sdata=hahxQJr3RKSkZvU5zmQyEVTA4U89A7SJyhOZnjvBZBo%3D&amp;reserved=0
>
> Thanks for considering this feature!
> -Brendan Robert
>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message