Hi,

I am playing with ModelGlue scaffolding feature with CF9 Hibernate ORM. I 
find that the List event handler returns a query result set of all my 
records in table, whereas cf9 EntityLoad() returns an array of entiities. 
When I look in the MG framework where it executes List() , I see that the 
handler initially retrieves an array of entities via EntityLoad(). Then MG 
converts the returned array with objects to a query with EntitytoQuery(). 

I'd rather have an array of objects than a simple query resultset. Can I 
change MG so that this behaviour is configurable?

Here is the MG code where a list of objects is retrieved and then convreted 
to a struct:

in /ModelGlue/gesture/modules/orm/cform/cfORMService.cfc

    any function list(required string entityName, struct 
filterCriteria=StructNew(), string sortOrder="", string returnType="query") 
{
        var list = 
EntityLoad(arguments.entityName,arguments.filterCriteria,arguments.sortOrder);
        if (arguments.returnType eq "query") {
            list = EntitytoQuery(list);
        } 
        return list;
    }

As far as I can see the argument returnType is not specified in the calling 
component (/ModelGlue/gesture/modules/orm/cform/cfORMAdapter.cfc) so it 
always defaults to "query".

Marc

-- 
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

Reply via email to