Re: [Modeling-users] instantiating objects from (aka, mapping entities to) stored procedure result
Status: Abandoned
Brought to you by:
sbigaret
From: Sebastien B. <sbi...@us...> - 2003-12-20 16:14:09
|
Ezra E. <sf-...@pr...> wrote: > Hi, >=20 > Looking through the docs it seems that the modeling framework makes so= me > stronger assumptions about how entities are mapped to database result sets > than one finds in EOF. In particular, is there a way to map objects to t= he > results of stored procedures? (Again, how hard would it be for an EOF-sa= vvy > developer to add?) Well, you're right, we're making stronger assumptions than in EOF. Unfortunately, here again, I've no experience at all w/ stored proc. so it's hard to tell how much time it would take, just because I cannot foresse any possible difficulty that may arise. However, it's also no clear to me what you really mean by <<mapping objects to the results of stored proc.>>. Does this mean that such entities will be read-only, or should there also be some procedures to insert & delete? BTW, if I assume that stored procedure is not a too ugly beast and that, from a python db-adaptor point of view it does not differ a lot from the standard SQL manipulating selects/inserts/deletes (sounds like a middle-to-strong assumption, but never mind), then I guess this won't be to hard to implement. MDL.Entity should probably store the stored procedures to be used. Having a quick look at the code, I think that this info. about stored proc. to use can be used, at best, during the DBContext's performChanges() phase, when AdaptorOperation are built from DatabaseOperation. Does this answers the question? Probably not fully ;) Again, please fill a RFE at sourceforge if it's something you're likely to need quickly. But the story is that I have the feeling that it should not be a difficult thing to add to the framework. Last, I'd say as usual that, if you have small toy-examples that we can play with, that would be great --at least for me who never played w/ any stored proc. -- S=E9bastien. |