Questions tagged [activerecord]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
7
votes
3answers
390 views

What is less desirable: Inefficient code or maintenance overhead?

In our Ruby on Rails app, we have a set of conditions to define the status of a user. Currently, there is logic that checks if those conditions are true given a user. We are in the process of writing ...
-1
votes
1answer
38 views

Measure ActiveRecord performance in `limit` method [closed]

How can I measure ActiveRecord's performance? My query has where and an order by clause, and on top of that I want the top row: User.where(…).order(id: :asc).limit(1) Knowing that the order by ...
6
votes
4answers
1k views

Examples of mid/large-scale web-apps built without an ORM?

I've been reading a lot of hate spewed on ORMs, and am genuinely interested in finding out if there is a better way of doing things. Unfortunately, while there are tons of books, blog posts, and ...
0
votes
0answers
80 views

How to build large applications with Active Record pattern?

Recently I saw an inspiring quote: The secret to building large apps is never build large apps. Break your applications into small pieces. Then, assemble those testable, bite-sized pieces into ...
7
votes
2answers
4k views

Are the Repository Pattern and Active Record pattern compatible?

Currently I am developing a webapp where I have defined models implementing the Active Record pattern. Each model also is defined by an interface that specifies the Entity properties and makes it easy ...
1
vote
1answer
725 views

ActiveRecord equivalent in Java [closed]

My question is fairly simple.. What is the closest ORM to ActiveRecord that I'd be able to find for Java? In other words, in terms of thinking patterns and knowledge, with limted development time, ...
2
votes
1answer
259 views

What TDD/BDD tests should be writen to test an ORM

So I'm writing an ORM for NodeJS and using Mocha + Chai to test it. What I want to know is, what tests I should write to it, insertion tests should also have a querying test so I can check if the ...
1
vote
0answers
1k views

What are the bad points of using Core Data for iOS like an ORM

I just starting to use Core Data for my iOS app and I am thinking about how use Core Data for my needs. What are the features of my app: The user look for products proposed from a catalog. The user ...
6
votes
3answers
5k views

Ruby on Rails database using static lookup tables or constant strings

In some ruby on rails projects, I have seen instances where strings are used instead of a foreign key reference to a lookup table. I usually code in C#/SQL Server and use lookup tables, but am not ...
0
votes
3answers
1k views

Doesn’t active record violate SRP and OCP?

I have watched the active record classes in our project grow into large, do-it-all classes. When you need anything about a user, for example, you should go to the Person class. While this makes ...
3
votes
1answer
362 views

How should developers go about managing complex plural words with ActiveRecord?

I'm playing with pluralize at the command line, and it's beginning to scare me. Multiples of leaf is leafs (not leaves) Multiples of cactus is cactus- not cacti, or even cactuses. Radius becomes ...