Added roles
Added generated code for projectdb queries