The DAL should throw an exception in this case. I will add a check.
On Jan 18, 4:49 pm, Lorin Rivers <lriv...@mosasaur.com> wrote: > Right! > > Hey, it might be good to have an example in The Book that uses a different > construction than the one I mistakenly tried to use. > > On Jan 18, 2011, at 15:30 , Massimo Di Pierro wrote: > > > > > > > > > > > > > for row in semaphore_rows.find(lambda row: > > row.table_name[0]=='data_table'): > > print row > > > should be > > > for row in semaphore_rows.find(lambda row: > > row.table_name=='data_table'): > > print row > > > else you compare only the first char with 'date_table' > > > On Jan 18, 1:05 pm, Lorin Rivers <lriv...@mosasaur.com> wrote: > >> semaphore_query = db4.rollup_semaphore.id > 0 > >> semaphore_set = db4(semaphore_query) > >> semaphore_rows = semaphore_set.select() > >> for row in semaphore_rows.find(lambda row: > >> row.table_name[0]=='data_table'): > >> print row > > >> returns nothing. While: > >> print db4(db4.rollup_semaphore.table_name=='data_table').select() > > >> Returns: > >> rollup_semaphore.id,rollup_semaphore.table_name,rollup_semaphore.rollup_sta > >> tus > >> 1,data_table,False > > >> Which is what I expect the first to return. > > >> What am I doing wrong? > > >> -- > >> Lorin Rivers > >> Mosasaur: Killer Technical Marketing <http://www.mosasaur.com> > >> <mailto:lriv...@mosasaur.com> > >> 512/203.3198 (m) > > -- > Lorin Rivers > Mosasaur: Killer Technical Marketing <http://www.mosasaur.com> > <mailto:lriv...@mosasaur.com> > 512/203.3198 (m)