# DataMapper 0.2.5 Release

**URL:** <https://www.ruby-forum.com/t/datamapper-0-2-5-release/123725>\
**Category:** Ruby\
**Created:** [December 20, 2007, 1:45am UTC](https://www.ruby-forum.com/t/datamapper-0-2-5-release/123725 "2007-12-20T01:45:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sams](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e79b87/32.png) [@sams](https://www.ruby-forum.com/u/sams)\
**Post date:** [December 20, 2007, 1:45am UTC](https://www.ruby-forum.com/t/datamapper-0-2-5-release/123725/1 "2007-12-20T01:45:39Z")

</div>

Notes:  
Bug-fix release.

Some minor API changes and enhancements (MyModel#[] only accepts a  
primary key now, not an options hash).

database.get (equiv to AR’s find\_by\_id) is approximately 25% faster  
than previous.

No longer must you inherit from DataMapper::Base. Instead now you can  
include the DataMapper::Persistence module in your models (::Base is  
preserved for backwards compatibility).

Changes:  
– 0.2.5

- has\_one bugfixes
- Added syntax for setting CHECK-constraints directly in your  
properties (Postgres)
- You can now set indexes with :index =\> true and :index =\> :unique
- Support for composite indexes (thanks to Jeffrey G.)
- Add composite scope to validates\_uniqueness
- Added private/protected properties
- Remove HasOneAssociation, Make HasManyAssociation impersonate  
has\_one relationships
- Added #get method
- Persistence module added, inheriting from DataMapper::Base no longer  
necessary
