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
skade has joined #datamapper
skade has quit [Quit: Computer has gone to sleep.]
mkf has quit [Ping timeout: 252 seconds]
mkf has joined #datamapper
postmodern has joined #datamapper
lgierth has joined #datamapper
skade has joined #datamapper
mikecmpbll has joined #datamapper
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #datamapper
lgierth has quit [Quit: Ex-Chat]
lgierth has joined #datamapper
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #datamapper
postmodern has quit [Quit: Leaving]
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #datamapper
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #datamapper
mikecmpbll has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
mkristian has joined #datamapper
skade has joined #datamapper
skade has quit [Quit: Computer has gone to sleep.]
lgierth has quit [Quit: Ex-Chat]
skade has joined #datamapper
skade_ has joined #datamapper
skade has quit [Read error: Connection reset by peer]
skade has joined #datamapper
skade_ has quit [Ping timeout: 276 seconds]
skade_ has joined #datamapper
skade has quit [Ping timeout: 252 seconds]
ursooperduper has joined #datamapper
lgierth has joined #datamapper
skade_ has quit [Quit: Computer has gone to sleep.]
g0bl1n has joined #datamapper
skade has joined #datamapper
skade_ has joined #datamapper
skade has quit [Ping timeout: 245 seconds]
skade_ has quit [Quit: Computer has gone to sleep.]
postmodern has joined #datamapper
karamorf has joined #datamapper
<karamorf> I'm new to using datamapper and trying to figure out exactly how to do a subquery. The results I want are found with this SQL: "select id from sap_users where personnel_number not in (select supervisor from sap_users);" but for the life of me I can't figure out how to do it when using the objects. If someone has a good link for how to do subquerries that would work great as well, I'm just not being very succesful with my googling :)
lgierth has quit [Quit: Ex-Chat]
<postmodern> karamorf, sounds like you want to define two models that map to sap_users
<postmodern> karamorf, one a normal User and the other a Supervisor
<postmodern> Then maybe to Users.all - Supervisors.all
<postmodern> *do
lgierth has joined #datamapper
lgierth has quit [Client Quit]
g0bl1n has quit [Quit: g0bl1n]
<karamorf> postmodern, that sounds good. so it looks like the common way to do this would be to use a Discremenator property. However I don't know who the supervisor are upfront, I'd have to loop over the set of data after populating the Users object to set them as Supervisors. I'd also like Supervisors to still be in the Users class.
<karamorf> is there some way I can set the supervisors object to select the rows the have personnel_number matching the supervsior?
<postmodern> maybe you want a self-referential relationship
<karamorf> oo, that looks like a good path to go down. Thanks, I'll do some reading.
<postmodern> belongs_to :supervisor, model: 'User', child_key: ...
lgierth has joined #datamapper
g0bl1n has joined #datamapper
mkristian has quit [Quit: bye]
g0bl1n has quit [Quit: g0bl1n]
lgierth has quit [Ping timeout: 272 seconds]
lgierth has joined #datamapper
ursooperduper has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lgierth has quit [Remote host closed the connection]
lgierth has joined #datamapper
skade has joined #datamapper
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #datamapper
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #datamapper
skade has quit [Client Quit]
lgierth has quit [Quit: Ex-Chat]