Closed thecatwasnot closed 13 years ago
Hi, and thanks for the bug report.
While the join table currently is required for t_has_many associations from a relational database backed object to another object, it is largely unnecessary. I took a look at the code (it's been a while since I wrote that piece), and it appears to only use the join table to fetch the ids of the associated objects. This can just as easily be done by calling the associated class' _t_find_all_by_associate method.
Until I can make this change, you'll have to create a join table following ActiveRecord conventions. See http://rdoc.info/github/jwood/tenacity/master/Tenacity/OrmExt/ActiveRecord for details. Once fixed, you should be able to simply drop the join table.
I should be able to get this fixed within the next couple of weeks.
Thanks for the prompt response & neat project, will do!
No problem at all. Please don't hesitate to keep the bug reports coming if you run into any other issues.
This is fixed in master, and will go out with the next release.
Thanks! I grabbed master and have tried it, looks fantastic, and even fixes some weird behaviour I was seeing :)
I've started playing with tenacity in a new rails 3.1 app, interesting idea for sure but I've already blown things up.
I've got a AR User class, which t_has_many :projects, and my Project Mongoid Document with t_belongs_to :user, unfortunately now user creation fails. The error seems to indicate I should have a projects_users table in my AR db, which I do not, nor should I need one, should I? I get the feeling I'm missing something here.
Full stack trace:
I'm certainly willing to admit defeat if it's AR 3.1 that is the culprit, but from poking around tenacity's source it doesn't seem so.