I know, leave that as default but it would be nice to have the choice
to override if you wanted :)

I just came into this problem because I wanted the id's of the web2py
api desktop client to match those of the websites ( for updating
purposes ).

On Mar 4, 1:20 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> The all point of ID is that you do not set it. The db egnine sets it.
>
> On Mar 4, 12:07 pm, Joe  Barnhart <joe.barnh...@gmail.com> wrote:
>
>
>
> > What is the use case for controlling the id like this?
>
> > Does the id in question exist already or are you trying to fill in
> > "empty" ids?  If it exists already, why don't you update the existing
> > entry?  If the id does not exist already, then why is it important to
> > control the value?
>
> > On Mar 4, 9:41 am, ceej <cjlaz...@googlemail.com> wrote:
>
> > > Hey,
>
> > > I really think by doing db.your_table.insert(id=2,name='test') should
> > > override the tables id being inserted to 2 (or whatever you set).
>
> > > Other wise you have to do:
>
> > > new_row=db.your_table.insert(name='test')
> > > db(db.your_table.id==new_row).update(id=2)
> > > db.commit()
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to