== Version 0.20.0 A bug fix release. Some notable changes: * Added better sql injection protection in Og sql stores. * Fixed Mysql store reconnect bug. * Og falls back to pure ruby adapters for Mysql and Postgres, to make it easier to run out of the box. Please, don't forget to switch to the natively compiled adapters for production sites. * :uniq keyword * fix for self join. * Many, many, many bug fixes and small improvements. This release fixes all reported bugs in the spirit of out zero-bug tolerance philosophy. == Version 0.19.0 was released on 31/05/2005. Og reloaded part 2: Another superb release introducing a balanced mix of innovative new features, common but useful stuff and bug fixes. Some notable changes: * Og polymorphic relations. A groundbreaking feature made possible by Og's unique design and Ruby's power. Let's use an example to explain the concept: class Comment ... belongs_to Object # polymorphic marker end class User ... has_many Comment end class Article ... has_many Comment end u = User.new u.comments << User::Comment('Hello') a = Article.new a.comments << Article::Comment('Wow!') User::Comment and Article::Comment where automatically created by Og and are serialized in different tables (also automatically created by Og). This is the next step in DRY! * Og now supports inheritance using the well known Single Table Inheritance pattern. Thanks to Og's advanced design the pattern is fully encapsulated: class Document ... schema_inheritance end class Article < Document .. end class Photo < Document .. end Document.all # => includes Articles and Photos Article.all # => only Articles User.documents # => Articles and Photos User.documents(:type => Photo) # => only photos. Btw, this feature is orthogonal to the polymorphic relations feature just described, giving the developer great flexibility. * Integrated an SQLite3 patch by Ghislain Mary. * Integrated PostgreSQL binary data patch by Michael Neumann. * Fixed all reported bugs. == Version 0.18.0 was released on 01/06/2005. Mainly a bug fix release. Many small improvements were implemented. All reported bugs were fixed, as well as bugs found during the deployment of a live application. For more information consult the detailed changelog. Thanks to Julien Perrot for small patches. Some notable changes: * Thread safe mode was added again in Og. This works nice with the Webrick server. * New order macro in Og to set default ordering for each entity. The has_many collections respect the order setting. * Fixes in the SQLite adapter. * No warnings in the Posrgres adapter. * Cleaned up some source files. == Version 0.17.0 was released on 16/05/2005. Og Reloaded!! A totally new, clean and elegant implementation that supports tons of new advanced features. This version should be considered as a preview, but you really have to *try* this! A new version, with the rest of the planned features and bug fixes is expected shortly. Many thanks to Michael Neumann and the other hackers on the mailing list for ideas and suggestions that made this version possible. Most notable additions: * Extremely clean source code. Better names are used thorougout. Extra care was taken to make all features more orthogonal. * Brand new relation mechanism. The 'enchanting' of entities (managed classes) happens in multiple passes to be more flexible. Totaly separated graph/metadata creation and serialization code generation. The Graph metadata can be used for advanced scaffolding, testing and more. * Support for fully customizable primary keys. You are no longer forced to use xxx_oid primary keys. Appart from the extra flexibility this feature provides this is an essential step towards the planed 'reverse engineering' mode that will allow the use of existing schemas with Og. * More elegant inspection mechanism. Example: Article.relation(:user) # => Og::BelongsTo(...) Article.relations # => [...] Article.properties # => [...] * Joins_many relation, as an alias for one way, join table relations. * Support for 'active' collections. Active collection are synchronized with the backend Store and provide a more elegant interface and the opportunity for 'session' caching: article.comments << Comment.new instead of article.add_comment(Comment.new) # this is also allowed though. p article.comments p article.comments.size # the results of the first query is cached * Eager relations. comments = Article.comments(:include => User) for comment in comments p comment.user.name end Elegantly solves the N+1 query problem by using one join query. * No need for forward references when defining relations. Now, the following code magically works: class User has_many Comment # works even though Comment is not defined! end class Comment belongs_to User end * Use inflection where possible to infer missing configuration options. For example class Article belongs_to User # infects relation name :user ... * New, lean and mean Store interface. The code needed to teach Og how to serialize objects to backend store is dramatically reduced. The new interface is SQL agnostic, so non SQL-RDBM's stores are possible. * SQL agnostic querying interface, compatible with non-sql Stores. Here is an example: Article.find( :condition => 'hits > 2 AND rate > 3', :order => 'title', :offset => 30, :limit => 10 ) * More elegant (and non-sql store compatible) way for selective updates: article.title = 'Changed' article.hits += 1 article.update(:title, :hits) * New, in-memory store that support all features. This is a pure ruby solution useful for experimentation. It will also serve as the base for the forthcoming madeleine Store implementation. * Allow for multiple stores in one application. A great example, mysql_to_psql is provided. This example uses Og's powerfull features to automatically convert a Mysql database to a PostgreSQL database. Database migration was never easier. * Uses the excellent Facets utility collection to further clenup and minimize the code. * Managed classes or Entities should include the EntityMixin or extend the Entity class. Example: class Article < Entity .. end class Article include EntityMixin end This is done to avoid the Module module like in earlier versions of Og. However, Og is can infer the need to include the Managed mixin in typical cases: class Article property :title, String # when a property is defined Og automatically converts the # class to an Entity end class Article < AnExistingManagedEntity # also includes the mixin ... class Article include AModuleThatDefinesProperties ... * Improved support for og_delete interception. * Support for nested transactions. * Many, many smaller features and changes. Check out the file test/og/tc_store.rb for a demonstration of the new features. The stores for Oracle and SqlServer are not converted yet. == Version 0.16.0 was released on 15/04/2005. A snapshot of the latest developments. Many, many subtle improvements, new features and a major cleanup of the source code. Most notable additions: * Aspect Oriented Programming support. This new system is used to reimplement features such as Controller filters, Og callbacks and Og observers. By using this unified system you can now add Observers to controllers and use a metalanguage for wraping Og object callbacks: class Controller pre :force_login, :where => :prepend wrap Benchmark, :on => :index post :taraa, :on => login end module Timestamped pre :on => :og_insert { |this| this.create_time = Time.now } pre :on => :og_update { |this| this.update_time = Time.now } pre :on => [:og_insert, :og_update] { |this| this.create_time = Time.now } end This feature will be used extensivelly in future versions to improve logging, the shaders and more. * Major cleanup of the source. Converted the N namespace to Nitro. * Add Og Timestamped mixin. * Og improvements. * Improved the Gem installation process. * Fixed all reported bugs. == Version 0.15.0 was released on 04/04/2005. A great release. Many cool new features and tons of subtle improvements. We also welcome a new core developer, Anastastios Koutoumanos, who started contributing with a new SqlServer adapter. Most notable additions: * NestedSets mixin: class Comment include NestedSets end or class Comment include Hierarchical, :method => :nested_sets end c.add_comment(child_comment) c.full_children c.direct_children c.children this is a reimplementation of the SqlTraversable mixin available in older versions. * New implementation of Orderable mixin: class Comment property :body, String belongs_to :article, Article include Orderable, :scope => article end c.move_higher The Orderable mixin uses the :scope parameter to dynamically alter the methods appended to the Comment class. * New SqlServer adapter. == Version 0.14.0 was released on 18/03/2005. Many many important fixes, and many small additions and improvements. Og mixins are introduced with an experimental List mixin implementation. Most notable additions: * Support for objects that participate in list (ordering/removal etc) * Add useful new enchant methods. * Fixed all user reported bugs. == Version 0.13.0 was released on 17/03/2005. A maintenance release. Most notable additions: * Better separated from Nitro. * Database related validations (validate_unique) etc. * Emmit warnings on implicit graph changes. * Many bugfixes. == Version 0.12.0 was released on 07/03/2005. A careful blend of new features and subtle improvements to the existing infrastructure. Some important bugs where fixed aswell. Most notable additions: * Og automatically generates finders for all properties, for even easier (and portable) querying: class Article property :title, :body, String property :hits, Fixnum property :create_time, Time end you get the finders: Article.find_by_title Article.find_by_body Article.find_by_hits Article.find_by_create_time The finders take into account the unique constrain, to return an array or just an object as needed. * Og introduces lifecycle observers to avoid 'poluting' the model objects with excess functionality. You can use every object as observer (duck typing) or extend from an AR style Observer class. The observer callbacks are precompiled in the lifecycle methods only if defined, so the perfomance is not affected in the general case. * Fixed Og bug: multiple many_to_many relations with the same target class. * further code cleanup, improved examples and more. == Version 0.11.0 was released on 28/02/2005. The platform continues to evolve and now supports the the Oracle database out of the box. This version features improved documentation, important bug fixes and many subtle improvements to make programming even more enjoyable. Many thanks to Matt Bowen for his help with this release. Most notable additions: * Documentation (doc/og_tutorial.txt, doc/og_config.txt) * Og Oracle adapter. * Og provides advanced metadata for the managed objects class Article property :title, String property :body, String has_many :comments, Comment end par = Article.properties_and_relations => [Property(:title), Property(:body), Og::HasMany(:comments)] par[2].klass => Comment par[2].meta[:linkback] => :article_oid * Og Typemacros, here is an example: def VarChar(size) return String, :sql => "NOT NULL VARCHAR(#{size})" end property :title, VarChar(30) * Option for faster startup, skip schema check. * Many small Og improvements and fixes. WARNING: If you used an earlier version of Og you may need to drop your database and let Og recreated it automatically. == Version 0.10.0 was released on 15/02/2005. An important release. Most notable additions: * Improved Og implementation (cleaner code) and new Og adapter subsystem. * New SQLite3 Og adapter, improvements in MySQL and PostgreSQL adapters (needs version 1.1.0 of Sqlite3-Ruby). * Better GemSpec for easier installation by RubyGems. * Og supports optional typechecking by using property metadata. * and many more smaller fixes. WARNING: If you used an earlier version of Og you may need to drop your database and let Og recreated it automatically. == Version 0.9.3 was released on 01/02/2005. A maintenance release. Most notable additions: * Og metalanguage relations insert metadata into the target class, useful for advanced scaffolders. * Og refer_to meta-language command. * Correct handling of booleans. * Auto-include metalanguage on prop. * Many bug fixes. == Version 0.8 was released on 12/01/2005. A snapshot of the latest code. Cool new features, many fixes and improvements in older features. Many thanks to Michael Neumann for giving intelligent suggestions and finding small bugs. Most notable additions: * New automatic validation system: class User prop_accessor :name, :password, String validate_confirmation :password validate_length :name, :range => 2..12 end u = User.new(...) unless u.valid? p u.errors.on(:name) p u.errors[:password] end * No global variables in Og. * Recoded Og to allow for future support of multiple databases (even on different RDBMS systems) on a single application. * cleaned up backend code. * More unit tests. * Supports Ruby 1.8.2 == Version 0.7 was released on 27/12/2004. A snapshot of the latest code. Many fixes and new features result in a more mature product. Many thanks to the ruby hackers that sent suggestions and patches used in this release! Most notable additions: * Totaly recoded prop_accessor mechanism, avoids polution of the Module class. * prop_accessors for Modules, allows synthesizing of managed objects from Mixins. * new automatically generated methods in Og. * MockDatabase leverages the FlexMock object for easier unit testing. == Version 0.6 was released on 13/12/2004. This is a preview release, the api for the new features is not finalized. This early release gives other developers to offer suggestions on the final form of those features. Most notable additions: * Og many_to_many relations with auto generation of the join table. * Og has_one relation. == Version 0.5.0 was released on 21/11/2004. New standalone version. SQL indices can be defined again. == Version 0.5.0 was released on 01/11/2004. Renamed to Og (ObjectGraph) Og combines the best features of Active Record and NDB. A fully working MySQL adapter is also provided. Moreover the code base is further cleaned up. Small improvements to the application configuration system. This version is integrated in Nitro. == Version 0.2 was released on 07-10-2004. The sofware is actually usable but not tested in a production environment. Comments from the Ruby community are critical in order to fix possible bugs and improve the API. Suggestions for missing features are also welcome. This version only supports the Postgres Database.