Tutorial by Examples

In Java, activerecord pattern isn't very popular. Though there are some implementations: http://arjava.sourceforge.net/ http://javalite.io/ http://www.javalobby.org/articles/activeobjects/ http://www.jooq.org/
ActiveRecord pattern was popularized by Rails. It's the default ORM there. Conventions Rails ActiveRecord is driven by conventions: class names are mapped to table names, field names are mapped to field names, foreign and primary keys should be named accordingly. These conventions can be overridde...
The pattern can be illustrated by the following pseudocode: product = new Product() product.name = "Some Book" product.price = 123.45 product.save() The following SQL would be a result: INSERT INTO products (name, price) VALUES ('Some Book', 123.45);

Page 1 of 1