29 May '12, 6am
DataMapper - Getting started with DataMapper:
DataMapper allows the use of natural primary keys, composite primary keys and other complexities. Because of this, when a model is declared with a belongs_to relationship the property to hold the foreign key cannot be initialized immediately. It can only be initialized when the parent model has also been declared. This is hard for DataMapper to determine, due to the dynamic nature of ruby, so it is left up to developers to determine the appropriate time.