That depends on the database you are using.  For example with Oracle it
gives you the ROWID which you would then have to still figure out how that
relates to your automatically generated PK assuming you are doing
automatically generated ones that is.  One could argue with Oracle to just
select out your sequence then insert that and not rely on a transaction to
get a newly inserted value although I would think transactions are used for
more than just getting a newly inserted ID.  If for some reason someone was
using Access, it looks like they would get nothing back although one could
post a ton of reasons why not to use Access.  Does PGSQL have an
autonumbering solution built in? Surprised not to see it listed for this but
not used it in so many years that can not remember if it has a way of doing
autonumbering

I had yet to try nested transactions with CF8 or read up on them, had just
assumed all this time after reading they would be available via the beta
that they were in fact there.  Shame they did not make it to the release.

On 10/28/07, Brian Kotek <[EMAIL PROTECTED]> wrote:
>
> If you're on CF8, you get back the inserted ID automatically when you
> insert a record.
>
> On 10/28/07, Barry Beattie < [EMAIL PROTECTED]> wrote:
> >
> >
> > yeah, I thought I read that somewhere. Surprised that it didn't make
> > it since Java has multiple levels of transactions (which, when you
> > start using them with unit tests and code coverage tools is just soooo
> > handy)
> >
> > what's making it tricky is that my beans and DTO's are being generated
> > by FlexBuilder which I'm then mod'ing. And of course, an insert is
> > followed by a re-query to get the PK, thanx to the db I'm using - all
> > within a transaction. I can't even cheat and put both in the same
> > cfquery tag...
> >
> > serves me right for using code generators...
> >
> > no solution here ... just offloading some angst after being cought-out
> > yet again...
> >
> >
> >
> >
> >
> >
> > On 10/28/07, Brian Kotek < [EMAIL PROTECTED]> wrote:
> > > What sucks is that during the Scorpio beta tour, they told us they had
> > > nested transactions working. I'm not sure what happened to cause them
> > to
> > > remove it, but that would be such a useful feature that I'm sorry they
> > > couldn't keep it in.
> > >
> > >
> > > On 10/27/07, Barry Beattie <[EMAIL PROTECTED] > wrote:
> > > >
> > > >
> > > > On 10/27/07, Sam Larbi <[EMAIL PROTECTED]> wrote:
> > > > > I'm a big fan of continuous improvement.
> > > >
> > > > I'm not.
> > > >
> > > > I used to be but I'm taking a more pragmatic approach now-a-days.
> > > > Sending code into the big bad world, never to see it again, and
> > having
> > > > my reputation rest on it's success or otherwise. Get it right, get
> > it
> > > > out.
> > > >
> > > > but back to the origional question: looks like there's no magic
> > > > bullet, nothing has changed since I last grappled with these
> > problems
> > > > (except I'm using Remoting more, making the issue more accute).
> > > >
> > > > it sounds like the only solution is the "big design up-front", where
> > > > processes that need to sit within a transaction can be identified
> > and
> > > > catered for at the start. not quite as agile as I'd like...
> > > >
> > > > ... nesting transactions, that'd fix it. CF9 wishlist perhaps?
> > > >
> > > > oh well...
> > > >
> > > > thanx
> > > > barry.b
> > > >
> > > > > >
> > > >
> > >
> >
> > > >
> >


-- 
Aaron Rouse
http://www.happyhacker.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to