I have a table called 'District' in my database:
+----+---------+-------------+----------+------+------------------------------------------------+-----------+
| id | version | description | homepage | logo | name | region_id |
+----+---------+-------------+----------+------+------------------------------------------------+-----------+
so, on my controller i have:
def show = {
def districtInstance = District.get(params?.id)
println districtInstance
println params
if(!districtInstance){
flash.message = "${message(code: 'default.not.found.message', args: [message(code: 'district.label', default: 'District'), params.id])}"
redirect(action : "list", params?.id)
}
else{
[districtInstance : districtInstance]
}
}
While I'm expecting to see the full row:
| 71 | 0 | bogus | | | bogus | 4 |
I only see:
bogus
on the console. How can I have access to the entire row? (Specially districtInstance.region_id
? )