Thanks Jeremy, I'll give that a shot.

Scott

On Tue, Dec 7, 2010 at 8:40 AM, Jeremy Evans <[email protected]> wrote:

> On Dec 7, 6:14 am, Scott LaBounty <[email protected]> wrote:
> > All,
> >
> > I'm not sure how to do this in Sequel. I have tables/models for Users and
> > Requests so a User can create a request and there's a "one_to_many
> requests"
> > in the User model and a "many_to_one user" in the Request model. So far,
> so
> > good. I'd like to add the capability to allow users to "Like" (not what
> I'm
> > calling it, but it will at least be familiar from FaceBook). So there,
> we'd
> > have a many_to_many relationship between the requests and users (users
> could
> > "Like" many requests and requests could be "Like"d by many users). I'm
> not
> > sure how to do this since we already have a relationship between the two
> > models.
> >
> > Thoughts?
>
> It's possible to have multiple relationships between models, you just
> have to use different names:
>
>  class User
>    one_to_many :requests
>    many_to_many :liked_requests, :class=>Request
>  end
>
> 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]<sequel-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/sequel-talk?hl=en.
>
>


-- 
Scott
http://steamcode.blogspot.com/

-- 
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.

Reply via email to