On 11/16/06, Shannon -jj Behrens <[EMAIL PROTECTED]> wrote:
>
> I haven't used activemapper, but does this help?
>
> http://pylonshq.com/project/pylonshq/wiki/SqlAlchemyWithPylons
>
> I think the challenge is that you need to actually connect the engine,
> and you need a dsn to do that.
>
Didn't help much, because with ActiveMapper the connection is made diferently.
And the example I show before works,... until I add a ForeignKey to
another table, then ActiveMapper gives again the error can't find
engine|mapper|connect
I'm trying to dive in the internals, but for a python newbie is a kind
of hard :-)
I made a simple script like:
activemapper.metadata.connect('mysql://user:[EMAIL PROTECTED]/database')
#declare classes, like the User example
t = objectstore.context.current.create_transaction()
#do things with all classes, insert/select/update/delete
t.commit()
everything works. But in pylons I just can't get things to work right.
And doing the connect in every request is not the best thing to do :-)
Best Regards,
BMS
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---