DB ORM
Marco Leise
Marco.Leise at gmx.de
Wed Aug 10 08:41:41 PDT 2011
Am 10.08.2011, 16:01 Uhr, schrieb Piotr Szturmaj <bncrbme at jadamspam.pl>:
> zhang wrote:
>> About ORM,
>> the Python has SQLObject (http://sqlobject.org/),
>> the Java has Hibernate (http://www.hibernate.org/),
>> and the C# has NHibernate and Entity Framework
>> (http://msdn.microsoft.com/en-us/data/aa937723).
>>
>> The D maybe also need one. Glad to see someone being interesting in
>> this.
>
> I think D needs user defined attributes first.
When I think about all the attributes I set on fields in Java code for
Hibernate you may actually be right. Even without inheritance and more
arcane stuff I would expect to be able to define some relations between
objects/tables, so associated data can be fetched either eagerly or
lazily. Where lazily is the minimum, because eager may just as well load
the whole database into memory. Then you get into the trouble of having
n-to-m associations and the need for a cache.
I believe it is a lot of work for a single person to create something of
the quality of Hibernate. An intermediate step may be appropriate, where
all the automatic glue is still done by the programmer. Caching,
associations, inheritance and the like. The "Persister" looks to me like
just that and with the CTFE abilities it could not have less overhead
which is a selling point.
More information about the Digitalmars-d
mailing list