[cl-dwim-devel] Retrofitting schema
    Levente Mészáros 
    levente.meszaros at gmail.com
       
    Fri Mar  5 13:19:38 UTC 2010
    
    
  
On Fri, Mar 5, 2010 at 11:35 AM, Attila Lendvai
<attila.lendvai at gmail.com> wrote:
>>        I'm using Perec for a project of us, and I think is great work from an object
>> model that maps itself to a relational model.
>>
>>        But now I'm thinking about the reverse. What if I have a relational database
>> which I want to retro-fit into a CLOS Model? Is this feasible (assuming the rdb
>> is well designed)?
In theory the metaclasses and slot metaobjects provide all the meta
data to drive the rdbms CLOS mapping (tables, columns, indexes,
functions to transform between lisp and rdbms primitive values). We
did not do this in the past, so we have no real experience. I think
you could do this by subclassing the metaclasses and slot metaobjects
and overriding some generics that calculate the rdbms mapping.
Alternatively you could simply change the computations (compute-as
expressions) in those metaobjects by setting them directly without
actually subclassing. This way you could reuse most of perec, but
there might be some corner cases.
Cheers,
levy
-- 
There's no perfectoin
    
    
More information about the cl-dwim-devel
mailing list