3 ms·
And the weird side-effect is that you can now write it somewhat as SQL: User.select().from().where(), etc., which conceivably could help those new to the framew
by there 17y ago
And the weird side-effect is that you can now write it somewhat as SQL: User.select().from().where(), etc., which conceivably could help those new to the framework.
which kind of defeats (part of) the point of it being a sql abstraction layer, doesn't it? granted, most of activerecord's backends are for sql servers, but now adding a sql-like syntax to other generic (nosql?) backends seems kind of confusing.
personally i wish they'd just keep find() and all the old methods for compatibility. the new stuff is neat but i don't see the point in deprecating and then actually removing the old things that have been around for many years.
- holman 17y agoYup, that was my first thought too. But you kind of need to know SQL to really figure out the current API, so maybe moving closer to that isn't a bad idea. In any case, you only need to know the idea of SQL, really, since chainable scopes let you go wild with where().joins().where().where() and you don't have to worry about syntax or aliasing. You can still use find() through 3.1 (so for at least a number of months I'd expect). At that point, they'll offer backwards compatibility via a plugin, so no worries.