Talk:Active record pattern

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computer science  
WikiProject icon This article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 ???  This article has not yet received a rating on the project's quality scale.
 ???  This article has not yet received a rating on the project's importance scale.

I think enterprise applications shouldn't link to java enterprise applications. These techniques are really applicable to more, and the link is misleading. ~JWHPryor

I don't think LINQ is an implementation of Active Record. It seems to just add a veneer on top of sql statements, rather than creating an maintaining a whole object.

It definitely is not. Besides, it was just thrown in for no reason. I'm removing it. --AndreFillipe 11:00, 4 January 2007 (UTC)

What about Enterprise Java Beans - don't they fit the bill?

Perhaps we could have a section talking about the pros/cons of having your entity domain classes aware of their storage mechanism?

By what criteria are some of the open source implementation links allowed to remain and others removed? - (talk) 04:48, 25 January 2008 (UTC)

Hu12 please explain why the references to Rails active record and the C++ implementation from butterfat were remove? —Preceding unsigned comment added by (talk) 05:00, 25 January 2008 (UTC)


Why is Django not mentioned here? Remove the word "new" from the pseudo-code example, and that's exactly what their model access looks like. —Preceding unsigned comment added by (talk) 19:53, 24 May 2010 (UTC)

some thoughts[edit]

The "pseudo-code" is valid JavaScript, although I don't know of any implementations of Active Record in JS.

I'm making the following changes: pointing out that it's common in software that accesses databases (enterprise or no), but acknowledging Martin Fowler's "Patterns of Enterprise Application Architecture" as the source of the name.

Kragen Javier Sitaker (talk) 20:38, 10 April 2008 (UTC)

Actually, I believe the code was originally valid code for Ruby and ActiveRecord, and it seems to have mutated to JavaScript "pseudocode" while no one was looking, which is a bit funny if there really is no AR-based frameworks for JS... =) --wwwwolf (barks/growls) 19:20, 15 August 2008 (UTC)

Command Pattern Similarity[edit]

To me the Active Record Pattern looks very similar to the Command Pattern, with the Active Record Pattern basically just being an implementation of the Command Pattern. I know these examples are little contrived but if using the Command pattern they might look something like this:

partAdder = new PartAdder() = "Sample part"
partAdder.price = 123.45

And Select:

partFinder = new PartFinder()
partFinder.add_requirement_is_equal("name", "Sample part")
partFinder.add_requirement_is_greater_than("price", 10.0)
b = partFinder.execute()

I just think the article could mention the similarity perhaps. Hullo exclamation mark (talk) 13:15, 8 February 2010 (UTC)

Python - plagiarism?[edit]

The section on Elixir in Python is a direct copy of what is on the Elixir wiki ( - I only assume that the elixir wiki's description came first - it was the elixir page that brought me to this wikipedia page in the first place. -dashavoo —Preceding unsigned comment added by (talk) 21:37, 20 June 2010 (UTC)


Why does the article mention a desire to merge with DAO? I do not see any discussions here concering the idea, I myself oppose it. So I suggest to remove the remark from the beginning of the article. Remove it for good or move it to the talk page...--Karl Brodowsky (talk) 19:36, 12 July 2010 (UTC)


symfony does not bundle its own orm. it uses doctrine (by default) or propel. —Preceding unsigned comment added by (talk) 10:11, 8 December 2010 (UTC)

This is now fixed. Billyoneal (talk) 20:31, 17 February 2011 (UTC)

Static Methods[edit]

The "Criticism" segment talking about static methods doesn't make sense. Propel, for example, does not do anything in terms of static methods, but certainly is an ActiveRecord implementation. Therefore, I think this point is really moot, and will be nuking that entire section unless someone can come up with a reasonable counterpoint. Billyoneal (talk) 20:31, 17 February 2011 (UTC)


The bit about breaking encapsulation doesn't make any sense. The whole point of active record is that it does encapsulate data access into the business objects. Grauenwolf (talk) 07:19, 31 March 2011 (UTC)

CodeIgniter has no ActiveRecord[edit]

Just removed this for the second time: CodeIgniter calls its Query Builder "ActiveRecord" which is both misleading and wrong. CI's implementation has nothing to do with implementing this pattern. —Preceding unsigned comment added by (talk) 15:13, 23 May 2011 (UTC)


The description of ActiveJDBC looks like an ad. I think that it should be rewritten in a more objetive way

For example is not true that ActiveJDBC requires zero configuration, and there is no benchmark to support the claim that it's "lightweight and fast". — Diegof79 (talk) 21:36, 9 December 2011 (UTC).

Object/Row Identification/Linking[edit]

A key component of the Active Record pattern, is the link between the in-memory object and the database (or view) row it represents - usually in the form of some sort of (in-memory object) ID that maps to a db table/row primary key. This is different than the object attribute/table column data-based mapping; identification is the critical piece that typically facilitates the retrieval/saving between object and row (ties the 2 together) as noted by Fowler, et. al. I feel this needs more attention n this discussion. — Preceding unsigned comment added by (talk) 16:50, 3 December 2014 (UTC)

criticism citation needed. Really?[edit]

The sentence "unit testing an active record object without a database becomes difficult" has a "citation needed"-tag. I can't see who should be quoted here for what reason. Is is not obvious in and of itself without some external quote that testing something which needs a database while not having a database would present itself as being difficult? I'd like to remove this tag unless someone can remember how it came to be and what kind of citation the tagger would have liked to see. (talk) 10:01, 9 July 2015 (UTC)


"Symfony's default database layer and ORM "Doctrine" does not implement active record but rather a data mapper approach." This statement is a half truth, and literally taken it is false. Doctrine, which is widely used with Symfony, does use active record; Doctrine 2 which is widely used with Symfony 2 uses data mapper approach. KSiimson (talk) 09:09, 9 September 2016 (UTC)

Entity Framework CodeFirst - is it ActiveRecord?[edit]

Was surprised not to find it on the list here... Alirobe (talk) 18:27, 28 March 2017 (UTC)