Frans,

Your problem is not with SQLObject, it's just standard Python namespace 
confusion.

To have a look at your namespace, type dir().  You will find that one entry on 
the list is 'Family', but you shouldn't find 'AddressBookDB' on the list.

If you want to define AddressBookDB in your namespace, try this:
import AddressBookDB
dir()

Or else, to simply do what you want to do with your existing namespace, try 
this:
type(blist[0])==Family

Hope that helps.

On Thursday 17 May 2007 06:44, F.A. Pinkse wrote:
> Hi All,
>
> While trying to refactor my app, I found out that there are more than
> one type of resultlists returned with and within the Results of a select.
>
>
> I use Boa constructor debug mode.
>
> When I do:
>
> Db> blist=Family.select()
>
> Db> type(blist)
>
> <class 'sqlobject.sresults.SelectResults'>
>
> Db> type(blist)==sqlobject.sresults.SelectResults
>
> True
>
>
> But...when I continue.
>
> Db> blist[0]
>
> <Family 1 familyname="'some familyname...'">
>
> Db> type(blist[0])
>
> <class 'AddressBookDB.Family'>
>
> Db> type(blist[0])==AddressBookDB.Family
>
> NameError: name 'AddressBookDB' is not defined
>
>
> Do I do something wrong or do I not understand something?
> Who can help me out.
>
>
> With best regards,
>
>
> Frans.
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> sqlobject-discuss mailing list
> sqlobject-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to