Why not create an array of features (graphics) and use setFeatures as normal?The Graphic class allows you to transform data in any format to an object the api understands.I use php and mysql to store records which are primarily created and edited through web forms, and viewed in reports outside the mapping application. But they have a geographic component, mostly point geometry (x/y). I use both user based queries and pseudo-feature layers (a graphics layer wired up for onPanEnd and onZoomEnd to request using map bounds). The records aren't returned in the same format as arcgis server returns them. So I create graphics with the results, and use them just like I would with ags results from query, identify, etc.As far as handling multiple features per record:var features = [];
dojo.forEach(results), function (result) {
dojo.forEach(result.features, function (feat) {
var graphic = new esri.Graphic();
graphic.setSymbol(SOME_SYMBOL);
graphic.setGeometry(feat.geometry);
graphic.setAttribures({
resultId: result.id,
featureId: feat.id,
field1: result.field1,
field2: result.field2
});
graphic.setInfoTemplate(new esri.infoTemplate('My Features', '${*}');
features.push(graphic);
});
});