integrate 2 model forms

18 views
Skip to first unread message

Raul A. Gomez

unread,
Mar 14, 2012, 5:12:47 PM3/14/12
to FormAlchemy
i have a product with many images relationship in database. Now i can
enter the images by its form separately. and then in a dropdown in
Product i select it. But i want to insert the product and the image at
the same time save its name in database and upload it. i tried binding
product to images and i get xception: Mapped instances to be bound
must either have a primary key set or not be in a Session. When
creating a new object, bind the class instead [i.e., bind(User), not
bind(User())]. . not sure why. at least some ideas normally how its
done. thanks.


Gaël Pasgrimaud

unread,
Mar 20, 2012, 4:27:22 AM3/20/12
to forma...@googlegroups.com

Isn't the error message explicit ? Try to add session=dbsession when
binding instances

>
>
> --
> You received this message because you are subscribed to the Google Groups "FormAlchemy" group.
> To post to this group, send email to forma...@googlegroups.com.
> To unsubscribe from this group, send email to formalchemy...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/formalchemy?hl=en.
>

Reply all
Reply to author
Forward
0 new messages