On Mar 9, 11:56 am, Scott LaBounty <[email protected]> wrote:
> Jeremy,
>
> Thanks for the explanation, but I'm still seeing a problem with these four
> lines (which should work if I'm reading your explanation correctly).
>
> cProgrammingLanguageAuthors = cProgrammingLanguage.authors_dataset
> dennisRitchieBooks = ritchie.books_dataset
> authors = cProgrammingLanguage.authors
> books = ritchie.books
>
> In each case I get an error that a method doesn't exist (authors_dataset,
> books_dataset, authors, and books respectively).
My bad, I didn't catch the error in your association lines.
one_to_many and many_to_many expect a plural symbol, not a singular
one:
class Book < Sequel::Model
many_to_many :authors
end
class Author < Sequel::Model
many_to_many :books
end
Things should work correctly after you make that change.
Jeremy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sequel-talk" 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/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---