On Mon, Apr 5, 2010 at 00:32, Sergiu Dumitriu <[email protected]> wrote:

> On 04/02/2010 10:08 AM, Denis Gervalle wrote:
> >    3) In XWikiHibernateAttachmentStore#saveAttachmentContent(), the
> default
> > is to persist the document, this is not consistent with the document not
> > doing the same in reverse. (I would have better understand that
> persisting
> > attachment contents does not persist the document.)
>
> I don't like this either. I think there's an issue I created some time
> ago, but Jira is down right now so I can't find it.
>

We agree but this is not so easy to be changed. I will look after your
issue...


> > B) This change has no real impact on any code that would take care of
> saving
> > the attachments separatly, it will just be saved twice, isContentDirty()
> > currently only prevent useless archiving. This could be optimized by not
> > saving contents as well when it is not dirty, but I do not want a
> negative
> > vote on the rest for just this. So please vote this as B)
>
> I'm not sure that this is really a problem. As far as I've seen, all
> code that manually saves attachments also resets isContentDirty to
> false, so (most) manually saved attachments won't get saved again,
>

Currently, isContentDirty on attachment content is only checked to avoid
unneeded archiving, but persistence is done without taking care of it. I
just want to put it back the way it should always been.

I have just receive Sergiu vote after my results post, so for correctness
the final result is:

6 +1, no 0, no -1

Thanks,

Denis
-- 
Denis Gervalle
SOFTEC sa - CEO
eGuilde sarl - CTO
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to