dkubb changed the topic of #datamapper to: Datamapper v1.2.0 | Mailing List: http://is.gd/aa9D | Logs: http://is.gd/qWAL7V | DataMapper 2 Renamed to ROM, see #rom-rb for development
rbq has joined #datamapper
<rbq> Hi there, maybe one of you can help me: Using DM 1.2.0 I'd like to :order something by the count of an (m:n) association. Is that possible?
<rbq> More precisely, my `Movie has n, :tags, through: Resource` and the other way round. I tried things like `Tag.all :order => [ :movie_tag.count ]` but this doesn't work at all. Any help about where to look is highly appreciated.
<mbj> rbq: Quick googling found me this. Dunno if its accurate: http://stackoverflow.com/questions/12429429/datamapper-sorting-results-through-association
<Cinchy> [URL] ruby on rails - Datamapper: Sorting results through association - Stack Overflow
dkubb has joined #datamapper
<rbq> mbj: Hmm, thx. I've read this thread before but couldn't figure out how to make it work with counting instead of a property.
<mbj> rbq: You can define a view and a RO model on top.
<mbj> rbq: Than you can sort on the count.
<rbq> I guess that would work. Or maybe a cached counter property. I just hoped to find a simple solution that relies on DM features because I think it's quite easy to do in SQL.
lgierth has quit [Quit: Ex-Chat]
rbq has quit [Quit: rbq]
zombor has quit [Remote host closed the connection]
g0bl1n has joined #datamapper
zombor has joined #datamapper
zombor has quit [Remote host closed the connection]
zombor has joined #datamapper
zombor has quit [Ping timeout: 252 seconds]
g0bl1n has quit [Ping timeout: 250 seconds]
dkubb has quit [Quit: Linkinus - http://linkinus.com]
brianpWins has joined #datamapper
tchnadja has joined #datamapper
tchnadja has quit [Remote host closed the connection]
mikecmpbll has joined #datamapper
mbj_ has joined #datamapper
mbj has quit [Ping timeout: 246 seconds]
solars has joined #datamapper
mikecmpbll has quit [Quit: Computer has gone to sleep.]
mikecmpbll has joined #datamapper
byrdina has joined #datamapper
rbq has joined #datamapper
viranch has quit [Ping timeout: 245 seconds]
rsim has joined #datamapper
byrdina has quit [Remote host closed the connection]
viranch has joined #datamapper
blakheim has joined #datamapper
blakheim has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mikecmpbll has joined #datamapper
rbq has quit [Quit: rbq]
gadgetoid_ has joined #datamapper
gadgetoid has quit [Ping timeout: 260 seconds]
gadgetoid_ is now known as gadgetoid
rbq has joined #datamapper
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mikecmpbll has joined #datamapper
raven has joined #datamapper
zombor has joined #datamapper
rbq has quit [Ping timeout: 245 seconds]
lfox has joined #datamapper
g0bl1n has joined #datamapper
skade has joined #datamapper
g0bl1n has quit [Ping timeout: 250 seconds]
akasper has joined #datamapper
lgierth has joined #datamapper
akasper has quit [Read error: Connection reset by peer]
akasper has joined #datamapper
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
lgierth has quit [Ping timeout: 246 seconds]
lgierth has joined #datamapper
g0bl1n has joined #datamapper
innings has joined #datamapper
innings has quit [Remote host closed the connection]
mkristian has joined #datamapper
mikecmpbll has joined #datamapper
mbj_ is now known as mbj
v0n has joined #datamapper
rsim has quit [Quit: Leaving.]
mkristian has quit [Quit: bye]
mkristian has joined #datamapper
skade has quit [Quit: Computer has gone to sleep.]
solars has quit [Ping timeout: 260 seconds]
BRMatt has joined #datamapper
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
g0bl1n has quit [Ping timeout: 250 seconds]
g0bl1n has joined #datamapper
brianpWins has quit [Quit: brianpWins]
raven has quit [Quit: raven]
rsim has joined #datamapper
rsim has quit [Ping timeout: 245 seconds]
mbj has quit [Ping timeout: 260 seconds]
lfox has quit [Quit: ZZZzzz…]
BRMatt has quit [Ping timeout: 246 seconds]
lfox has joined #datamapper
mbj has joined #datamapper
solars has joined #datamapper
brianpWins has joined #datamapper
rsim has joined #datamapper
rsim has quit [Ping timeout: 245 seconds]
dank123 has joined #datamapper
<dank123> Hey, I've got a question
<dank123> So i'm trying to make a Self referential many to many relationship. Ex, a user has a friendship between a user
<dank123> I followed the tutorial here (http://datamapper.org/docs/associations.html), under the title "Self referential many to many relationships"
<dank123> however, I'm getting an error: http://localhost:8080/users/1/friendships --data "friend_id=2" DataObjects::IntegrityError: friendships.user_id may not be NULL
<dank123> here's my code: http://pastebin.com/rid6b49P
<dank123> just wondering if the tutorial is out of date
solars has quit [Ping timeout: 248 seconds]
<dank123> hello?
solars has joined #datamapper
rbq has joined #datamapper
lfox has quit [Ping timeout: 272 seconds]
raven has joined #datamapper
raven has quit [Client Quit]
postmodern has joined #datamapper
<dank123> Hey, I've got a question So i'm trying to make a Self referential many to many relationship. Ex, a user has a friendship between a user I followed the tutorial here (http://datamapper.org/docs/associations.html), under the title "Self referential many to many relationships" however, I'm getting an error: http://localhost:8080/users/1/friendships --data "friend_id=2" DataObjects::IntegrityError: friendships.user_id may not be NU
rbq has quit [Read error: Operation timed out]
rsim has joined #datamapper
rsim has quit [Ping timeout: 245 seconds]
mkristian has quit [Ping timeout: 260 seconds]
<dank123> Is there anyone in this IRC
lgierth has quit [Ping timeout: 250 seconds]
rsim has joined #datamapper
mkristian has joined #datamapper
solars has quit [Ping timeout: 272 seconds]
mkristian has quit [Quit: bye]
mbj has quit [Ping timeout: 248 seconds]
<dank123> HELLO
<dank123> ANYONE
lfox has joined #datamapper
rsim has quit [Quit: Leaving.]
dank123 has quit [Ping timeout: 250 seconds]
Eiam has joined #datamapper
rsim has joined #datamapper
skade has joined #datamapper
rsim has quit [Ping timeout: 245 seconds]
lgierth has joined #datamapper
mbj has joined #datamapper
rsim has joined #datamapper
lfox has quit [Quit: ZZZzzz…]
akasper has quit [Quit: Leaving.]
rsim has quit [Ping timeout: 245 seconds]