Jose,
in theory that should work. what does your decrementNumRooms method look
like? How do you know that it is not the right entity key?
For what it is worth, i don't use the gae Key object in my code, i just
pass the web2py id to run_in_transaction and query based on that. I know
that it is working because i see transaction collusion warnings in my logs
from time to time.
christian
On Tuesday, April 9, 2013 1:44:39 AM UTC-7, José Manuel López wrote:
>
> Hi,
> I'm trying to get a Offer entity in my DB (GAE) and I'm doing something
> like this:
>
> offerKey = gae.Key.from_path('Offer', offer.id) # offer is my the offer
> using DAL.
>
> Now I have to make a decrementation inside a transaction GAE:
> if (not gae.run_in_transaction(decrementNumRooms, offerKey)):
>
> return dict(meta=dict(message=T("This offer is SoldOut") , status=206
> ))
>
> But gae.Key is not returning the correct Entity Key...
>
> How can I do that?.
>
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.