On 8/4/06, OriginalBrownster <[EMAIL PROTECTED]> wrote: > > Running that script in the tg-admin shell yeilded an error saying that > no such column of user_upload existed. > It looks like you've set the joinColumn attribute to user_upload rather than upload_user.
> Also when i tried to upload a file I got an error saying that > upload_user was not specified. > I created an uploaded file and gave it the assignment key of one > through the catwalk > > > however when i tried to upload through my app i got a problem. I think > it may be because I am not specifying which user uploaded the file, > however I thought the code would take of this because of the > multiplejoin? > No, the SQLObject code will take care of the *relationships* between the two classes. It won't magically guess the data you want to put in it. You have to get the user (or at least the user id) from identity to pass to your UploadFile class. --8<--8<--8<-- *snip* > > and here is the way I am uploading a file > > u = UploadedFile.byFilename(upload_file.filename) > u = UploadedFile(filename=file, abspath=target_file_name) > As I said earlier, you need to get an instance of the current user from identity to pass to UploadedFile on creation. Check out the IdentityManagement page[1] on trac for clues to achieve this. Lee [1]: http://trac.turbogears.org/turbogears/wiki/IdentityManagement -- Lee McFadden blog: http://www.splee.co.uk work: http://fireflisystems.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

