def getNodeTypes(){
def response = []
List origList = Topic.executeQuery( "select new map(T.id as id, T.topicName as topicName) from Topic T");
List delList = PostTopics.executeQuery( "select new map(T.id as id, T.topicName as topicName) from Topic T left join T.posts P where P.post.id=?",[params.id.toLong()]);
List addList = origList - delList
//List origList = NodeType.findAll()
response = [dellist:dellist,addlist:addlist];
render response as JSON
}
Remove the following:
Similar to #187
See #169