News for hackers. Stuff that matters.
Re:My time with Rails is up by ryanbrunner on Sunday May 22, 2016 @01:50PM (#11749516)
That's a totally valid point, but is 100% orthogonal to what's being discussed. Invoking a single command to validate, run callbacks, persist to the database, etc, etc. a model (and the larger argument of whether conflating DB access and persistence logic is a good thing) has nothing to do with whether the object is aware of it's own properties.

They are both critcisms of ActiveRecord, for sure, but quite a bit different in content. One (AR objects not knowing their own properties) feels, at least to me, like an unfortunate early design decision, while the other (encapsulating everything involved with saving a model in a single statement, "magic avoidance" be damned) is very much in line with the core philosophy of ActiveRecord and Rails.

Re:My time with Rails is up by eropple on Sunday May 22, 2016 @01:53PM (#11749525)
> a single object or an entire object graph must be stored in the database

Hence "the last point" (though you might have caught me mid-edit). I view these as functionally the same problem: not only are you instantiating the object, but it must immediately go to live in the database or it's useless.

But you're right in that it is a philosophical problem. Rails is wrong. =)