Another question: Is it possible to nest DB.use? I'd like to have the
same behavior as with the @Transaction annotation from Spring.


On 2 Mrz., 14:55, ced <[email protected]> wrote:
> Ah great! Thanks!
> - Chris
>
> On Mar 2, 2:37 pm, Jeppe Nejsum Madsen <[email protected]> wrote:
>
>
>
> > ced <[email protected]> writes:
> > > When I use Mapper outside a request, say in an actor, how do I wrap it
> > > in a transaction? I know that I do a S.addAround(DB.buildLoanWrapper)
> > > to have transactions within a request.
> > > Can anyone provide a simple code snippet?
>
> > You can use use :-)
>
> > DB.use(DefaultConnectionIdenfifier) {connection =>
> >   User.findAll ....
>
> > }
>
> > /Jeppe

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" 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/liftweb?hl=en.

Reply via email to