Grrr...

'foo.name'.like

..tony..

On Wed, Nov 11, 2009 at 9:15 PM, Ryan S <[email protected]> wrote:

> Hrm, that just throws an error
>  ArgumentError: is an invalid instance: NilClass
>
> On Nov 11, 8:43 pm, Tony Mann <[email protected]> wrote:
> > 'name.like' => 'cheese'
> >
> > On Wed, Nov 11, 2009 at 3:08 PM, Ryan S <[email protected]> wrote:
> > > I am pretty sure I am going to look retarded here but after looking
> > > around I couldn't really find an answer.
> >
> > > class Foo
> > >  include DataMapper::Resource
> >
> > >  belongs_to :bar
> >
> > >  property :id, Serial
> > >  property :name, String
> >
> > > end
> >
> > > class Bar
> > >  include DataMapper::Resource
> >
> > >  property :id, Serial
> > >  property :name, String
> > > end
> >
> > > test = Foo.all(:name.like => "%cheese%")
> > > test[0].bar // <= does not exist
> >
> > > Is there some reason why the like clause doesn't keep the associatons
> > > or am I just being stupid?
> >
> > > --
> >
> > > You received this message because you are subscribed to the Google
> Groups
> > > "DataMapper" group.
> > > To post to this group, send email to [email protected].
> > > For more options, visit this group at
> > >http://groups.google.com/group/datamapper?hl=.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "DataMapper" group.
> To post to this group, send email to [email protected].
> For more options, visit this group at
> http://groups.google.com/group/datamapper?hl=.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected].
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=.


Reply via email to