On 26 August 2010 13:24, DAZ <[email protected]> wrote: > How come you need to surround a word with % for like to work? >
That's just the syntax. It's from the SQL standard. They're wildcards. (see Gary's email) > Is there a way of getting all the tag fields at once without having to > find all the posts and then iterate through them? > I don't think so. I mean, you could reduce things to just fetching the tags field, but to a large extent (especially with the API exposed by DM) strings are more or less opaque. I don't think you can easily tell the DB "These fields are space separated tag lists" without something like a stored procedure. So the processing would need to be done in ruby. > I was looking for a quick and easy tag system, but think I might have > to consider a separate model for them.... > You could also look at dm-tags (available as a gem, or from http://github.com/datamapper/dm-tags ) > thanks again, > No problem Regards Jon -- You received this message because you are subscribed to the Google Groups "DataMapper" 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/datamapper?hl=en.
