Detaching dataset on errors
Franck Routier <[email protected]>
| Newsgroups | gmane.comp.java.orm.simpleorm |
|---|---|
| Message-ID | <1218286662.6743.7.camel@franck-laptop> |
Hi,
I have the case where I try to commitAndDetachDataSet(), but there is an
error, say a duplicate primary key.
Until now I was catching the exception and detaching the records in the
catch block, so that they were not destroyed and could be returned back
to the UI layer for user interaction (say, possibly, choosing another
pk).
Now I can't find any method to detach a dataset, other than
commitAndDetachDataset().
I could getDataSet() and manually setSession(null) on it, but this
doesn't seem future safe (in a future version, detaching a dataset may
imply other actions that simply setting session to null).
So here is my question:
1) does detaching a dataset on error seem legitimate ? (if not, what
would be the alternative ?)
2) should we add a method to ses.detachDataSet() ?
Franck
------------------------------------
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/