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
tyranja has joined #datamapper
banditron has quit [Remote host closed the connection]
northrup has joined #datamapper
rsim has joined #datamapper
rsim has quit [Ping timeout: 240 seconds]
ckrailo has quit [Quit: Computer has gone to sleep.]
northrup has quit [Ping timeout: 252 seconds]
northrup has joined #datamapper
northrup has quit [Quit: northrup]
Sylvain1 has joined #datamapper
<Sylvain1> Is there a way to avoid datamapper to crash on MySQL warning like "Column 'foo' cannot be null" ?
<onewheelskyward> Yeah. Put data in that column.
<onewheelskyward> I'm being cheeky, but really, it's a code validation problem.
<onewheelskyward> You haven't ensured the data integrity, so the database is doing it for you.
<onewheelskyward> Is it a crash or is it raising an exception?
<onewheelskyward> If it is raising, you can catch it and continue code execution.
<onewheelskyward> Take a look at http://datamapper.org/docs/create_and_destroy.html "Raising an exception when save fails"
<Sylvain1> it crash, my solution so far was to set a default value but that's not elegant
<onewheelskyward> Can you gist the crash log?
<Sylvain1> sure
snusnu has quit [Ping timeout: 256 seconds]
<Sylvain1> onewheelskyward: https://gist.github.com/sylvainkalache/4a75ce3366448c2ca46e is this good enough?
<onewheelskyward> Wow, I've never seen that one before.
<onewheelskyward> Is your save call wrapped in a begin/rescue block?
<Sylvain1> yes
<onewheelskyward> If not it's worth the try. Also, are you really using ruby 1.9.1?
<Sylvain1> # ruby -v
<Sylvain1> ruby 1.9.2p290
<onewheelskyward> It's worth a shot. I have no idea.
<onewheelskyward> You can also use datamapper property definitions to define a default value.
<Sylvain1> onewheelskyward: yeah that's why I was doing, but I thought it might not be the best way to handle that
<onewheelskyward> That's a terrific way to handle it.
<onewheelskyward> You have your default values with your model definition, that keeps them all in the right place.
<Sylvain1> ok well
<Sylvain1> in that case I might stick with this
<Sylvain1> what do you think of https://github.com/snusnu/dm-reflection
<Sylvain1> would it avoid me to have "wrong" model?
<Sylvain1> because I had a bunch of issues doing my model "manually"
<onewheelskyward> I've used it.
<onewheelskyward> The issue I ran into (other than missing field types which I added via pull request) was that the constraints are not configured.
<onewheelskyward> So I ended up doing it manually anyhow.
<Sylvain1> onewheelskyward: ok, so basically better to do models manually
<Sylvain1> that's kind of annoying
<Sylvain1> at least you know very well your model the hard way :)
<onewheelskyward> True. :)
<onewheelskyward> I'm accessing a legacy database, so it's even worse. I have to track changes.
<onewheelskyward> Given time, I'll go back and make dm_reflections work for me, and then submit my changes.
<onewheelskyward> Because it's perfect for my use case.
<Sylvain1> that would be great
zombor has joined #datamapper
<dkubb> onewheelskyward: Sylvain1: there's a more recent dm-reflection that has seen updates .. https://github.com/yogo/dm-reflection still not totally recent, but the API it uses has been stable for a long time so it should still work
<dkubb> I kinda would love to see more work done on reflection. I want to do some more reflections in ROM and it would be nice if someone had recent experience with it on the DM side
campezzi has joined #datamapper
<campezzi> hey guys. is there a way to know why a call to a collection.destroy is failing? at first I thought it was a foreign key constraint but in this case I have a many-to-many relationship and I'm trying to destroy all records in the join table
<campezzi> i.e. a project has many features through estimates (and a feature can belong to multiple projects). when I try destroying a collection of estimates by their ids (I'm using a custom pk in the estimate table), it fails. would be helpful to know why :)
campezzi has left #datamapper [#datamapper]
<Sylvain1> dkubb: thanks!
<onewheelskyward> dkubb I'll check it out, thanks.
northrup has joined #datamapper
Sylvain1 has quit [Quit: Leaving.]
Sylvain1 has joined #datamapper
brianpWins has joined #datamapper
zombor has quit [Remote host closed the connection]
rsim has joined #datamapper
rsim has quit [Ping timeout: 240 seconds]
zombor has joined #datamapper
zombor has quit [Ping timeout: 240 seconds]
brianpWins has quit [Quit: brianpWins]
brianpWins has joined #datamapper
brianpWins has quit [Quit: brianpWins]
zombor has joined #datamapper
zombor has quit [Ping timeout: 246 seconds]
Sylvain1 has quit [Quit: Leaving.]
dkubb has quit [Quit: Linkinus - http://linkinus.com]
northrup has quit [Quit: northrup]
rsim has joined #datamapper
brianpWins has joined #datamapper
zombor has joined #datamapper
zombor has quit [Ping timeout: 252 seconds]
rsim has quit [Quit: Leaving.]
DireFog has quit [Quit: OMG pwnies!]
DireFog has joined #datamapper
solnic has joined #datamapper
mikecmpbll has joined #datamapper
rsim has joined #datamapper
mbj has joined #datamapper
tyranja has quit [Ping timeout: 240 seconds]
tyranja has joined #datamapper
rolfb has joined #datamapper
solnic has quit [Quit: Leaving...]
mbj has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mikecmpbll has joined #datamapper
mbj has joined #datamapper
mbj has quit [Quit: Lost terminal]
rsim has quit [Quit: Leaving.]
_whitelogger__ has joined #datamapper
franckverrot has quit [Quit: Connection closed for inactivity]
mbj has joined #datamapper
zombor has joined #datamapper
zombor has quit [Changing host]
zombor has joined #datamapper
zombor has quit [Remote host closed the connection]
snusnu has joined #datamapper
snusnu1 has joined #datamapper
snusnu has quit [Ping timeout: 246 seconds]
solnic has joined #datamapper
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mikecmpbll has joined #datamapper
snusnu1 has quit [Quit: Leaving.]
snusnu has joined #datamapper
postmodern has quit [Quit: Leaving]
rsim has joined #datamapper
snusnu has quit [Quit: Leaving.]
banditron has joined #datamapper
solnic has quit [Quit: Leaving...]
rolfb has quit [Quit: Leaving...]
zombor has joined #datamapper
zombor has quit [Changing host]
zombor has joined #datamapper
snusnu has joined #datamapper
solnic has joined #datamapper
solnic_ has joined #datamapper
solnic has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
v0n has joined #datamapper
mikecmpbll has joined #datamapper
bobocopy has joined #datamapper
solnic_ has quit [Quit: Leaving...]
knowtheory has quit [Quit: Computer has gone to sleep]
knowtheory has joined #datamapper
solnic has joined #datamapper
ckrailo has joined #datamapper
franckverrot has joined #datamapper
brianpWins has quit [Quit: brianpWins]
lnormous has joined #datamapper
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<lnormous> i have a model where I've overwritten the password= method to do some password hashing/salting stuff. I'm now unsure of the best way to handle the validations: anyone got any ideas?
<lnormous> was thinking I could check for the presence of password_hash, then return an error if it's not there about password, but can't see a way to do that with dm validations
mikecmpbll has joined #datamapper
<mbj> lnormous: dont password hash for your self.
<mbj> lnormous: Use bcrypt type from dm-types.
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<lnormous> mbj: Awesome, that's much easier
<mbj> lnormous: np
mbj has quit [Ping timeout: 264 seconds]
C0deMaver1ck has joined #datamapper
Sylvain1 has joined #datamapper
mbj has joined #datamapper
ckrailo has quit [*.net *.split]
coxandrew has quit [*.net *.split]
bhaak has quit [*.net *.split]
irclogger_com has quit [*.net *.split]
Spockz has quit [*.net *.split]
yeban has quit [*.net *.split]
jpr5 has quit [*.net *.split]
elskwid has quit [*.net *.split]
PolarFox has quit [*.net *.split]
ChanServ has quit [*.net *.split]
bobocopy has quit [*.net *.split]
snusnu has quit [*.net *.split]
mkf has quit [*.net *.split]
shingara has quit [*.net *.split]
didlix has quit [*.net *.split]
mbj has quit [*.net *.split]
Sylvain1 has quit [*.net *.split]
franckverrot has quit [*.net *.split]
knowtheory has quit [*.net *.split]
C0deMaver1ck has quit [*.net *.split]
kalleth has quit [*.net *.split]
lnormous has quit [*.net *.split]
solnic has quit [*.net *.split]
v0n has quit [*.net *.split]
zombor has quit [*.net *.split]
banditron has quit [*.net *.split]
xargoon has quit [*.net *.split]
grandy has quit [*.net *.split]
xybre has quit [*.net *.split]
kpwz has quit [*.net *.split]
gix- has quit [*.net *.split]
angelixd_ has quit [*.net *.split]
gadgetoid has quit [*.net *.split]
Ortuna has quit [*.net *.split]
_br_ has quit [*.net *.split]
flori has quit [*.net *.split]
dbussink has quit [*.net *.split]
DireFog has quit [*.net *.split]
stormwind has quit [*.net *.split]
jeremyevans has quit [*.net *.split]
viranch has quit [*.net *.split]
Cinchy has quit [*.net *.split]
namelessjon has quit [*.net *.split]
onewheelskyward has quit [*.net *.split]
mouse-_ has quit [*.net *.split]
rtyler has quit [*.net *.split]
mil has quit [*.net *.split]
rsim has quit [*.net *.split]
tchebb has quit [*.net *.split]
Frost has quit [*.net *.split]
indrek has quit [*.net *.split]
lnormous has joined #datamapper
banditron has joined #datamapper
v0n has joined #datamapper
bobocopy has joined #datamapper
Sylvain1 has joined #datamapper
jeremyevans has joined #datamapper
_br_ has joined #datamapper
mbj has joined #datamapper
irclogger_com has joined #datamapper
mkf has joined #datamapper
bhaak has joined #datamapper
namelessjon has joined #datamapper
tchebb has joined #datamapper
xargoon has joined #datamapper
gix- has joined #datamapper
DireFog has joined #datamapper
viranch has joined #datamapper
zombor has joined #datamapper
knowtheory has joined #datamapper
coxandrew has joined #datamapper
kpwz has joined #datamapper
rsim has joined #datamapper
franckverrot has joined #datamapper
Frost has joined #datamapper
snusnu has joined #datamapper
xybre has joined #datamapper
didlix has joined #datamapper
kalleth has joined #datamapper
ckrailo has joined #datamapper
Spockz has joined #datamapper
ChanServ has joined #datamapper
shingara has joined #datamapper
onewheelskyward has joined #datamapper
C0deMaver1ck has joined #datamapper
Ortuna has joined #datamapper
mouse-_ has joined #datamapper
grandy has joined #datamapper
angelixd_ has joined #datamapper
flori has joined #datamapper
Cinchy has joined #datamapper
yeban has joined #datamapper
mil has joined #datamapper
rtyler has joined #datamapper
dbussink has joined #datamapper
gadgetoid has joined #datamapper
indrek has joined #datamapper
stormwind has joined #datamapper
elskwid has joined #datamapper
jpr5 has joined #datamapper
PolarFox has joined #datamapper
rsim has quit [Quit: Leaving.]
stormwin1 has joined #datamapper
DireFog_ has joined #datamapper
DireFog has quit [*.net *.split]
stormwind has quit [*.net *.split]
rsim has joined #datamapper
rsim has quit [Read error: Operation timed out]
zombor has quit [Remote host closed the connection]
brianpWins has joined #datamapper
rsim has joined #datamapper
zombor has joined #datamapper
zombor has quit [Changing host]
zombor has joined #datamapper
ckrailo has quit [Ping timeout: 268 seconds]
ckrailo has joined #datamapper
rsim has quit [Ping timeout: 240 seconds]
snusnu has quit [Quit: Leaving.]
dkubb has joined #datamapper
snusnu has joined #datamapper
snusnu1 has joined #datamapper
snusnu1 has quit [Client Quit]
snusnu has quit [Ping timeout: 246 seconds]
bobocopy has quit [Quit: Leaving.]
brianpWins has quit [Quit: brianpWins]
v0n has quit [Quit: WeeChat 0.4.1]
v0n has joined #datamapper
snusnu has joined #datamapper
ckrailo has quit [Quit: Computer has gone to sleep.]
v0n has quit [Quit: WeeChat 0.4.1]
v1n has joined #datamapper
brainopia has joined #datamapper
ckrailo has joined #datamapper
postmodern has joined #datamapper
brianpWins has joined #datamapper
rsim has joined #datamapper
dkubb|away has joined #datamapper
dkubb has quit [Ping timeout: 245 seconds]
dkubb|away is now known as dkubb
brainopia has quit [Quit: brainopia]
knowtheo1y has joined #datamapper
knowtheo1y has quit [Client Quit]
DireFog_ is now known as DireFog
knowtheory has quit [Ping timeout: 260 seconds]
zombor has quit [Remote host closed the connection]
knowtheory has joined #datamapper
rsim has quit [Quit: Leaving.]
jpr5 has quit [*.net *.split]
elskwid has quit [*.net *.split]
dkubb has quit [*.net *.split]
PolarFox has quit [*.net *.split]
ChanServ has quit [*.net *.split]
snusnu has quit [*.net *.split]
DireFog has quit [*.net *.split]
mkf has quit [*.net *.split]
shingara has quit [*.net *.split]
didlix has quit [*.net *.split]
mbj has quit [*.net *.split]
Sylvain1 has quit [*.net *.split]
franckverrot has quit [*.net *.split]
C0deMaver1ck has quit [*.net *.split]
kalleth has quit [*.net *.split]
lnormous has quit [*.net *.split]
banditron has quit [*.net *.split]
stormwin1 has quit [*.net *.split]
xargoon has quit [*.net *.split]
grandy has quit [*.net *.split]
xybre has quit [*.net *.split]
kpwz has quit [*.net *.split]
gix- has quit [*.net *.split]
angelixd_ has quit [*.net *.split]
gadgetoid has quit [*.net *.split]
Ortuna has quit [*.net *.split]
_br_ has quit [*.net *.split]
flori has quit [*.net *.split]
dbussink has quit [*.net *.split]
knowtheory has quit [*.net *.split]
postmodern has quit [*.net *.split]
jeremyevans has quit [*.net *.split]
viranch has quit [*.net *.split]
Cinchy has quit [*.net *.split]
namelessjon has quit [*.net *.split]
mouse-_ has quit [*.net *.split]
onewheelskyward has quit [*.net *.split]
rtyler has quit [*.net *.split]
mil has quit [*.net *.split]
tchebb has quit [*.net *.split]
Frost has quit [*.net *.split]
indrek has quit [*.net *.split]
dkubb has joined #datamapper
knowtheory has joined #datamapper
namelessjon has joined #datamapper
snusnu has joined #datamapper
lnormous has joined #datamapper
mbj has joined #datamapper
stormwin1 has joined #datamapper
Sylvain1 has joined #datamapper
jeremyevans has joined #datamapper
postmodern has joined #datamapper
xargoon has joined #datamapper
Ortuna has joined #datamapper
DireFog has joined #datamapper
C0deMaver1ck has joined #datamapper
franckverrot has joined #datamapper
tchebb has joined #datamapper
banditron has joined #datamapper
viranch has joined #datamapper
_br_ has joined #datamapper
xybre has joined #datamapper
shingara has joined #datamapper
ChanServ has joined #datamapper
mouse-_ has joined #datamapper
didlix has joined #datamapper
angelixd_ has joined #datamapper
kpwz has joined #datamapper
onewheelskyward has joined #datamapper
grandy has joined #datamapper
gix- has joined #datamapper
flori has joined #datamapper
mkf has joined #datamapper
kalleth has joined #datamapper
Frost has joined #datamapper
Cinchy has joined #datamapper
dbussink has joined #datamapper
mil has joined #datamapper
rtyler has joined #datamapper
gadgetoid has joined #datamapper
indrek has joined #datamapper
PolarFox has joined #datamapper
elskwid has joined #datamapper
jpr5 has joined #datamapper
mbj has quit [Ping timeout: 260 seconds]
ckrailo has quit [Quit: Computer has gone to sleep.]
coxandrew has quit [Ping timeout: 240 seconds]
coxandrew has joined #datamapper
brianpWins has quit [Quit: brianpWins]
zombor has joined #datamapper
zombor has joined #datamapper
zombor has quit [Changing host]