Re: Savepoint

[email protected] Tue, 04 Aug 2009 20:04:11 +1000
Newsgroups gmane.comp.java.orm.simpleorm
Message-ID <[email protected]>
Hello Franck,

Yipes.  Is this something that you really needed?  

I'm guessing as a way to recover from broken optimistic locking.  But that would not work -- there would be no way to correct the situation.

This sort of thing can lead to many issues, and needs thought.  What is your use case?

We should probably take care that if a flush() fails, then unflushed records remain in a state that they can be flushed again.  I have not looked, but should probably be the case already.

It should cost the same as clone(), as that it what it does.  And maybe clone would be more useful?

I see you have a test case, have not had a chance to look at it carefully.

But what is your use case?

Let us put Map to bed with a test case, and then have a review of aggregate, before adding too many more features.

Regards,

Anthony

At 02:23 AM 3/08/2009, you wrote:
>  
>
>Hi Anthony,
>
>I couldn't help but commit a new feature whose intent is to allow to
>recover a dataset after a rollback, without the cost of the clone()
>solution.
>
>If not used, the feature has no impact on the way simpleorm works, so I
>thought it was quite harmful...
>
>I called it savepoint, and the usage is:
>
>ses.begin(ds.savepoint());
>
>then, if 'ds.hasSavepoint()', you can:
>
>ses.rollbackAndDetachDataset();
>
>The tradeoff is that ds.savepoint() is quite costly, especially for big
>dataSets... (but should be less costly than clone()).
>
>Of course, comments are welcome !
>
>Franck
>
>


Spreadsheet Detective,
Southern Cross Software Queensland Pty Limited
54 Gerler Street
Bardon, Queensland 4065, Australia.

Email: [email protected]
www.SpreadsheetDetective.com
Ph: +61 427 830248 (Australian Eastern Standard Time)

"If the model seems correct only because the numbers look right, 
then why build the model in the first place?"


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/SimpleORM/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/SimpleORM/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
114105f3.jpg (image/jpeg, 3.3 KB) - not displayed