Hi Paulo,

Doesn't seem like a bug to me.
More like a typo you made in the model...

But if I remember correctly you would get an error defining a reference to 
a non existing table in older web2py releases.

You could also build the reference like this;
Field('image', db.image)

That way you would get an error when db.image doesn't exist. 

The reference notation can also be used for circular references...
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Self-Reference-and-aliases

Kind Regards 

Rene



On Tuesday, February 25, 2014 11:07:18 AM UTC+1, Paulo Ramos wrote:
>
> Well, this isn't a question, but a bug report (I'm new to the list).
>
>
> I was following online book, chapter 3, with a small difference. Instead 
> of using singular on tables names I use plural, so I give to the image 
> table the name 'images'. However I made a mistake when referencing images 
> in posts, i.e., I used "Field('image_id', 'reference image')", instead of 
> "Field('image_id', 'reference images')". Of course, when I tried to post a 
> comment an error message came up. After spending several minutes to figure 
> where the error was (well in this case the ticket system was not so helpful 
> because always pointed to the controller and not the model, where the 
> mistake was), I fix it, but the error message continue. I went to the 
> sql.log file, and table name still was in singular, so I change that in 
> sql.log. No changes, the error continue, albeit the multiple success word 
> in the end of sql.log.
>
> The solution I found was delete the storage.sqlite. After that everything 
> went smooth.
>
>
> I'm almost sure that this is a bug in DAL module.
>
>
> HTH,
>
>
> Paulo
>
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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.

Reply via email to