Hi I'm new at TurboGears and am getting slightly confused/lost by the
SQLObject docs.

I would be grateful if somebody could explain what the easiest way to
get the ems_name of a record in Ne_live is.

b=Ne_live.get(4)
b.Ems_live.ems_name ?????????
Traceback (most recent call last):
  File "<console>", line 1, in ?
AttributeError: 'Ne_live' object has no attribute 'Ems_live'
 c.ne_ems_id.ems_name ?????
Traceback (most recent call last):
  File "<console>", line 1, in ?
AttributeError: 'int' object has no attribute 'ems_name'


class Ems_live(SQLObject):
    class sqlmeta:
        idName = "ems_id"
    ems_name = StringCol()
    ems_sm_time = DateTimeCol()
    ems_sm_code = IntCol()

class Ne_live(SQLObject):
    class sqlmeta:
        idName = "ne_id"
    ne_ems_id = ForeignKey("Ems_live")
    ne_name = StringCol()


Many thanks

Jon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to