A
Alexey Petrushin
Hello, last days i investigated three ORM frameworks: ActiveRecords,
DataMapper and Og.
And found that they all shares almost same limitations (when i write
'support' i mean that tool allows to solve task 'simply' and
'effectively').
1. Inheritance support.
None of these frameworks hasn't inheritance support. You forced either
by 'single table inheritance' (suitable only for similar objects) or you
can use 'multiple tables' but lose polymorphism ('Parent.find(...)'
searches only in 'parent' table and do not searches in his children's
tables).
2. 'General reference'.
So, one object can make reference to any other object. For example
'Catalog' has 'content' reference, that references 'Article', 'Image',
'File'.
ActiveRecords - support, Og - partly, DM not, as far as i know.
3. Single ID space.
The continuation to 'General reference'. Ability to find object only by
his ID.
db.find(ID)
No matter is it Article, User or something else.
I really miss these features :-(.
The question is - is there any materials or article with explanations
how to implement all these features the best way?
Thanks!
DataMapper and Og.
And found that they all shares almost same limitations (when i write
'support' i mean that tool allows to solve task 'simply' and
'effectively').
1. Inheritance support.
None of these frameworks hasn't inheritance support. You forced either
by 'single table inheritance' (suitable only for similar objects) or you
can use 'multiple tables' but lose polymorphism ('Parent.find(...)'
searches only in 'parent' table and do not searches in his children's
tables).
2. 'General reference'.
So, one object can make reference to any other object. For example
'Catalog' has 'content' reference, that references 'Article', 'Image',
'File'.
ActiveRecords - support, Og - partly, DM not, as far as i know.
3. Single ID space.
The continuation to 'General reference'. Ability to find object only by
his ID.
db.find(ID)
No matter is it Article, User or something else.
I really miss these features :-(.
The question is - is there any materials or article with explanations
how to implement all these features the best way?
Thanks!