My query return attribute 'a_students' for row, but in select I wrote 
'db.a_groups.NAME'. Why?

tables.py

db.define_table(
 'a_groups',
 Field('ACADEMIC_YEAR', 'integer'),
 Field('NAME', length=25),
 Field('STATUS', 'integer'),
 Field('INACTIVE', 'integer', rname='"INACTIVE"'),
 Field('FO', 'integer'),
 Field('WLP', 'integer'),
 Field('FAC', 'reference t_fac'),
 migrate=False
)

db.define_table(
 'a_students',
 Field('GROUP_ID', 'reference a_groups'),
 migrate=False
)

db.define_table(
 'tt_main',
 Field('GROUP_ID', 'reference a_groups'),
 Field('MODULE', 'integer'),
 migrate=False
)

default.py

groups = db((db.a_groups.FO == 1) & (db.a_groups.FAC == faculty) & 
(db.a_groups.STATUS == 2) &
 (db.a_groups.INACTIVE == 0)).select(db.a_groups.id, db.a_groups.NAME)

for row in groups:
 ...

then I have error becouse row don't have 'a_groups'. Why I have 
'a_students' attribute?
<Row {'id': 1754, '*a_students*': <Set (a_students...et (tt_main.GROUP_ID = 
1754)>, 'NAME': 'Д-А401'}>

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/737654b9-6bc0-4737-9ee5-dd216d66e54b%40googlegroups.com.

Reply via email to