Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Limitations of all Ruby ORMs

Reply
Thread Tools

Limitations of all Ruby ORMs

 
 
Alexey Petrushin
Guest
Posts: n/a
 
      06-08-2008
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!
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Charles Oliver Nutter
Guest
Posts: n/a
 
      06-08-2008
Alexey Petrushin wrote:
> 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.
> 2. 'General reference'.
> 3. Single ID space.


Does Hibernate have all these features? Because there's an
ActiveHibernate project out there currently not moving forward. I'd love
to see some folks continue working on it, putting a nice Ruby face on
top of Hibernate.

http://code.google.com/p/activehibernate/

- Charlie

 
Reply With Quote
 
 
 
 
Sam Smoot
Guest
Posts: n/a
 
      07-12-2008
On Jun 8, 11:57*am, Alexey Petrushin <axy...@gmail.com> wrote:
> Hello, last days i investigated three ORM frameworks: ActiveRecords,DataMapperand 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!
> --
> Posted viahttp://www.ruby-forum.com/.


1. Agreed. We'd (DataMapper) like to support all 3 forms, but it'll
probably be post-1.0.

2. Yes, this is possible. It's probably not all that hard either. Just
haven't come across a personal use-case.

3. Technically, same as above, but it just looks crazy to me. I don't
see DM ever supporting this, and I'd be surprised if Hibernate did
either (though I could be wrong).

So for DM at least, number 2 would involve making the Query object
accept multiple models. Easy enough. Then it's conditions and field
and links, etc methods would need to accept a model as a parameter so
the method could return the properties (table/column information)
specific to that model. Then the DataObjectsAdapter would simply map
each model in the Query object to SQL and perform a join for a UNION
statement. It would be the Query object's responsibility to pad out
uneven fields between it's models.

And that's that. I don't see it taking more than a day to implement at
most.

But again, DM's features are driven by the people willing to scratch
an itch. If that sounds like you, feel free to drop on the IRC channel
(irc.freenode.net#datamapper). As the Rubinius guys say: If you can
breath, you can get commit access.

-Sam
 
Reply With Quote
 
Alexey Petrushin
Guest
Posts: n/a
 
      06-16-2009
> As the Rubinius guys say: If you can
> breath, you can get commit access.
>
> -Sam

I really can't breath without these features

So i created ObjectModel, Object Database
http://bos-tec.com/ui/Portal/Site/La.../Quick%20Start

Gem name ObjectModel.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to choose between ORMs? Alec Taylor Python 1 04-03-2013 01:16 PM
Python ORMs Supporting POPOs and Substituting Layers in Django Travis Parks Python 10 11-12-2011 04:11 PM
Working with databases (ODBC and ORMs) in Python 3.2 tkpmep@hotmail.com Python 1 11-10-2011 08:35 PM
ORMs for applications written in C gvk C Programming 1 01-09-2011 07:24 AM
Re: ORMs for applications written in C gvk C Programming 2 01-08-2011 10:06 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57