[ColdBox SEEK 4.3.0+188] html.table() - ORM is not enabled

Hi,

I was working through the most recent Coldbox platform full documentation, and had switched to the quickstart guide, curious to utilize the html.table helper method.

While trying to use html.table(), I receive the error “ORM is not enabled”

I attempted to enable it via the full documentation instructions (modify Application.cfc and add line to Coldbox.cfc in configure() function), however, I still receive the same error.

I am attempting to use html.table on the returned array from the function below:

function getAnimals(required zoo_id=0){
var q = module_dao.getAll(arguments.zoo_id);

var zoo_animals = [];
for(var x=1; x LTE q.recordcount; x++) {
arrayAppend(zoo_animals, populator.populateFromQuery(wirebox.getInstance(“ZooAnimal”),q,x));
}

return zoo_animals;
}

The dao.getAll() from above returns q.execute().getResult(), where q = new Query(‘SELECT blah,blah, blah…’);

If I dump the returned var from getAnimals(), I get an array of ZooAnimal objects (with setters/getters), but I don’t think that is what I want?

Any guidance is greatly appreciated. I am using Wirebox, as well.

Thank you,

Adam

ORM is not enabled

After modifying Application.cfc and ColdBox.cfc, did you reinit the app? Assumed no reinit password is set in ColdBox.cfc, you shoud be able to reinit by adding query string, “?fwreinit=1”

Hmm, I think I might know why. I think the HTML helper is thinking that if you have an array of objects, that those are entities and not normal objects. Let me verify this.

Yep, that’s the issue. We need to further check if these are entities or not. I have created the following ticket:

https://ortussolutions.atlassian.net/browse/COLDBOX-599

The only way this will work is with inference on the properties in the objects. Meaning, you would have to make sure they have accessors = true and a property defined for each.