#1169: SingleJoin, MultipleJoin not working.
-----------------------------+----------------------------------------------
 Reporter:  miya             |       Owner:  anonymous
     Type:  defect           |      Status:  new      
 Priority:  normal           |   Milestone:           
Component:  Toolbox.Catwalk  |     Version:  1.0b1    
 Severity:  normal           |    Keywords:           
-----------------------------+----------------------------------------------
 I really dont know why this is happening.

 Please read this post in the TG's group.

 http://groups-
 
beta.google.com/group/turbogears/browse_thread/thread/ef9685c58eb41bbd/1a5f9dadfb4e6b84#1a5f9dadfb4e6b84

 raise AttributeError("%s instance has no attribute '%s'" %
 (self.soClass.__name__, attr))
 AttributeError: Pet instance has no attribute 'tgID'
 Request Headers:
   COOKIE: tg-visit=07ad5cd8a247b08a9df1a3d2acdcebd944aaa657

 The model.py
 //
 
------------------------------------------------------------------------------------

 class Pet(SQLObject):
     class sqlmeta:
         table = 'tg_pet'
         name = UnicodeCol(length = 40)
         surname = UnicodeCol(length = 40)
         color = UnicodeCol(length = 40)
         userid = ForeignKey("User")

 class User(SQLObject):
     """
     Reasonably basic User definition. Probably would want additional
 attributes.
     """
     # names like "Group", "Order" and "User" are reserved words in SQL
     # so we set the name to something safe for SQL
     class sqlmeta:
         table = "tg_user"

     user_name = UnicodeCol(length=16, alternateID=True,
 alternateMethodName="by_user_name")
     email_address = UnicodeCol(length=255, alternateID=True,
                                alternateMethodName="by_email_address")
     display_name = UnicodeCol(length=255)
     password = UnicodeCol(length=40)
     created = DateTimeCol(default=datetime.now)

     myPet = SingleJoin("Pet")

     # groups this user belongs to
     groups = RelatedJoin("Group", intermediateTable="user_group",
                          joinColumn="user_id", otherColumn="group_id")

 And I tried to use MultipleJoin and it doesn't work either.

 The project is very simple that i'm using is really simple.

 I just did

 tg-admin quickstart -i -t tgbig

 and then created the Pet class and modified the User class to have a
 singleJoin. (only that)

 I'm using Kubuntu Dapper if that helps.

-- 
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/1169>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Tickets" 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-tickets
-~----------~----~----~----~------~----~------~--~---

Reply via email to