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
rsim has quit [Quit: Leaving.]
cored has quit [Ping timeout: 276 seconds]
knowtheory has joined #datamapper
ckrailo has quit [Quit: Computer has gone to sleep.]
rsim has joined #datamapper
rsim has quit [Ping timeout: 240 seconds]
campezzi has joined #datamapper
campezzi has quit [Client Quit]
jeremyevans has joined #datamapper
snusnu has quit [Quit: Leaving.]
\_pol has quit [Remote host closed the connection]
rsim has joined #datamapper
rsim has quit [Ping timeout: 240 seconds]
zombor has quit [Remote host closed the connection]
zombor has joined #datamapper
zombor has quit [Ping timeout: 252 seconds]
dkubb has joined #datamapper
rolfb has joined #datamapper
rolfb has quit [Quit: Leaving...]
<dkubb>
!memo mbj wdyt about rubocop? worth testing in devtools?
<Cinchy>
dkubb: Memo recorded for mbj.
sylvain_ has joined #datamapper
<sylvain_>
hello, I wanted to make sure there is no way to import an convert an existing MySQL schema to datamapper format?
zombor has joined #datamapper
zombor has joined #datamapper
zombor has quit [Changing host]
zombor has quit [Ping timeout: 240 seconds]
<dkubb>
sylvain_: yeah, there's one project to generate DM models from an existing schema. lemme get you the link
banditron has quit [Remote host closed the connection]
mbj has joined #datamapper
<mbj>
.
<Cinchy>
mbj: [1h 36m 20s ago] <dkubb> wdyt about rubocop? worth testing in devtools?
<mbj>
dkubb: Never tried, but it uses whitequark/parser so should be less problematic than the ruby_parser based tools.
<mbj>
It is worth a try.
<dkubb>
yeah
<dkubb>
it seems a bit more strict than other tools we use
<dkubb>
I need to try it out and seriously fix the code and see what I agree with
<dkubb>
generally when testing a tool I try to use it as intended with the defaults in place and try to understand the motivation of the author before attempting to configure and tweak it to match my style
<xeviox>
is there a bug in datamapper with many-to-many associations?
<xeviox>
At first I used ":through => Resource" which worked fine
<xeviox>
now I want to use another class as I want to store additional values. So I created my association class "UserGroup" and changed the association line to ":through => :user_groups"
<xeviox>
when I now try to run my code I always get an error that "No relationships named users or user in GroupsUser"
<xeviox>
o_O I don't know where the switched name comes from..
rsim has joined #datamapper
<xeviox>
do I have to use the generated name???
<snusnu>
xeviox: you need to eplicitly define the has n, :user_groups *before* you go through it
Ortuna has quit [Ping timeout: 252 seconds]
<xeviox>
snusnu: what do you mean by "before you go through it" ?
<snusnu>
xeviox: you need to define the one_to_many relationship before you can define the many_to_many one (that goes through the one_to_many one)
<xeviox>
ah damn, I think I got it, completely missed the line in the online examples ..
<snusnu>
xeviox: so if you had Person.has n, :tasks, :through => Resource .. you then need Person.has n, :person_tasks *plus* Person.has n, :tasks, :through => :person_tasks
Ortuna has joined #datamapper
<xeviox>
snusnu: seems to work.. BIG THANKS! Seems I have missed that line everytime I checked the docs :(
<snusnu>
xeviox: heh no worries, glad it works now
\_pol has quit [Remote host closed the connection]
mbj has quit [Quit: leaving]
Ortuna has quit [Ping timeout: 264 seconds]
dward has joined #datamapper
Ortuna has joined #datamapper
<dward>
how do i specify which schema a table is using datamapper 1 with postgres
xeviox has left #datamapper ["Leaving"]
\_pol has joined #datamapper
bobocopy has joined #datamapper
<onewheelskyward>
Which schema or which connection?
\_pol has quit [Remote host closed the connection]
<dward>
I'm connected to an existing database, with multiple channels divided into schema. I tried setting the exact table name with this in the model, storage_names[:default] = 'channel_image.image', but it returned the error 'relation does not exist'
solnic has quit [Quit: Leaving...]
<onewheelskyward>
Interesting. I've done cross database work but not cross schema work.
<onewheelskyward>
What if you connect to the schema using a separate connection?
<dward>
good idea, I will give it a try
cored has quit [Ping timeout: 252 seconds]
cored has joined #datamapper
cored has joined #datamapper
<dward>
onewheelskyward: I have decidely to change the search_path between schemas as neccesary by issuing manual commands to the db. seems to work well.
<onewheelskyward>
How long does that command take?
<dward>
12ms
<dward>
SET search_path TO $user,<some_schema>,public;
<dward>
I may use multiple connections later on for a little async work if neccessary
<dward>
thanks for the tip though, if it's not working in ruby, do it how it's always been done
solnic has joined #datamapper
mbj has joined #datamapper
solnic has quit [Read error: Connection reset by peer]
snusnu has quit [Ping timeout: 256 seconds]
snusnu has joined #datamapper
Ortuna has quit [Quit: Computer has gone to sleep.]
solnic has joined #datamapper
<onewheelskyward>
aaah gotchya
<onewheelskyward>
I thought you were context switching for every model call. :)