Due to my current workload the SimpleBlog series has slowed to a crawl. Have no fear, it is not dead, merely sleeping.
I expect the next part of the series to be published before the end of next week. Sorry for the delay! :)
Bring out the g33k
{ 2006 11 15 }
Due to my current workload the SimpleBlog series has slowed to a crawl. Have no fear, it is not dead, merely sleeping.
I expect the next part of the series to be published before the end of next week. Sorry for the delay! :)
coredump | 16-Nov-06 at 5:15 pm | Permalink
The thing is, for each ManyToMany I need an ‘extra’ table to manage the relations. I have like 5 ManyToMany relations, so I have to create a lot of classes…
But you’re right, after some hours spent with SO I’m already pissed off, I’ll give SQLA another try.
I should have used those hours spent with SO creating the extra tables then, right? Right. :)
coredump | 16-Nov-06 at 7:50 pm | Permalink
you don’t happen to have the Visit, VisitIdentity, Groups, etc… model.py using SQLAlchemy assign_mapper and not ActiveMapper roaming around your disk, do you?
Splee | 16-Nov-06 at 8:11 pm | Permalink
You don’t have to create a class for each relation table if you don’t want to. Yes, you have to create the table itself, but unless you want to have extra information about the join in the relation table it can be kept up to date just using the mapper and relation() function.
For example, take the many-to-many article. There we have
tag_post_table, but that doesn’t need a class of it’s own. Once the actual definition has taken place and the mapper is made aware of the relationships SA handles everything for you.And you can get hold of the plain SA identity relationships here.
Hope this helps.