#3 "dorm, the Delphi ORM" bullettin

A veeery log time after the last dorm bullettin. But, as usual, I was been very busy on some projects (not only dorm) and the time goes by…

However, dorm has been extended, polished and improved over the last few months. Has been used in a couple other projects in my compoany (www.bittime.it).

So, here’s a small list of improvements and some other tips:

About the ObjSupport it’s worth to spend some words about it.

Since the beginning, dorm is completely “perisstence ignorant”: In other words, you can persiste what you want, you dont need to inherit from a specific class or implement a specific interface. This is a very powerful feature but make some internal dorm mechanism very complex. But I really WANT to have this feature, so I’ve added another “mode” to work with dorm: ObjStatus.

If dorm engine finds a property nemed “ObjStatus” of a specific type, it’ll use that property to track the object status (Clean, Dirty, Deleted).

In this way, I gained a *LOT* of speed compared to the prior version regarding persistence of complex objects graph.


procedure DoSomethingOnPersonByID(ID: Integer);
  p: TPerson;
    p := Session.Load(ID);
    p.FirstName := 'Daniele';
    p.Car.Model := 'Civic';
    p.Phones.Add(TPhone.Create('555-555-33-22', 'Home'))
    Session.Persist(p); //generates insert, update, delete for related objects too

As Usual you can find the project code hereĀ https://code.google.com/p/delphi-orm/


comments powered by Disqus