They are SQLite views, though I suspect you'd have similar problems
with other database's views as well.

There is no auto-increment field at all - it's a database view rather
than a table. Having an auto-increment field doesn't make any sense in
a view, you're not going to insert any records into a view. These are
views that do things like summarize data from multiple tables.

~Brian

On Nov 13, 1:44 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> Do they have an autoincrement integer field, even if not called id?
> what database?
>
> On Nov 13, 1:31 pm, Brian M <bmere...@gmail.com> wrote:
>
> > Is there a way to work with database views using the DAL? I've got a
> > bunch of views in my database that handle common queries, but I'm not
> > seeing a way to use them with the DAL since they don't have an id
> > field. I tried to define a DAL "table" with the same fields as the
> > view and just set it to migrate=False, since I don't want the table to
> > be created, but from the Admin every query against the view is an
> > "Invalid Query". Is db.executesql() the only option?
>
> > ~Brian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" 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