fixed bug in graph model update query, continued generic mapping code