I strongly suggest you move this discussion to a private discussion
with Denes.

The DAL has limited support for legacy tables and all the work on this
topic was done by Denes.

I doubt anybody else can help you and it is a complex matter.

Massimo


On Dec 20, 12:09 pm, sushanth <[email protected]> wrote:
> thanks thats got fix,if i nesrt any value ,i am getting below error
>
> RACEBACK
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
> 13.
> 14.
> 15.
> 16.
>
> Traceback (most recent call last):
>   File "/home/sushanth/Desktop/web2py/gluon/restricted.py", line 188, in 
> restricted
>     exec ccode in environment
>   File 
> "/home/sushanth/Desktop/web2py/applications/welcome/controllers/default.py" 
> <http://127.0.0.1:8000/admin/default/edit/welcome/controllers/default.py>, 
> line 53, in <module>
>   File "/home/sushanth/Desktop/web2py/gluon/globals.py", line 95, in <lambda>
>     self._caller = lambda f: f()
>   File 
> "/home/sushanth/Desktop/web2py/applications/welcome/controllers/default.py" 
> <http://127.0.0.1:8000/admin/default/edit/welcome/controllers/default.py>, 
> line 13, in index
>     if form.accepts(request,session):
>   File "/home/sushanth/Desktop/web2py/gluon/sqlhtml.py", line 1159, in accepts
>     self.vars.id = self.table.insert(**fields)
>   File "/home/sushanth/Desktop/web2py/gluon/dal.py", line 3759, in insert
>     return self._db._adapter.insert(self,self._listify(fields))
>   File "/home/sushanth/Desktop/web2py/gluon/dal.py", line 703, in insert
>     raise e
> IntegrityError: (1452, u'Cannot add or update a child row: a foreign key 
> constraint fails (`new`.`users`, CONSTRAINT `users_ibfk_1` FOREIGN KEY 
> (`team`) REFERENCES `dogs` (`teamname`))')
>
> Can you please look into it.

Reply via email to