From: rubyhacker@... Date: 2005-10-27T04:52:03+09:00 Subject: Re: The "perfect" ORM? Alexandru Popescu wrote: > I've been working with Hibernate for quite a while and imo it is correctly > approaching so called > object - relational mismatch. > > The real good thing about this approach is that it is not obtrusive in any ways with your domain > model objects and it let's you focus and work only on the objectual world. That sounds good so far. > On the dark side of the problem: you should provide in some way the mapping between the object world > and the relational world. Yes, that is a necessary evil. Naturally I want the toolkit to be as smart as possible, and its usage to be painless as possible. > While there are a few things that could be a little simplified (like > automatic type conversions), the big problem is the impossibility to use this simplified form on > relationships. If the parametrized types would have been implemented without the erasure mechanism > than this simplification could be brought further, but for the moment we have to use some other way > to describe relations: and here comes into play the metadata. That sounds interesting, but I did not understand any of it. :) I am not sure what you mean by parametrized types, or what an erasure mechanism is. > There are a few different approaches > used: metadata through external XML, metadata through javadoc comments and lately metadata through > annotations. All of these seem wrong to me. My approach will be: Metadata through Ruby code external to the stored objects. I will try to give an example in a week or so. Thanks, Hal