LOG.info("Adding role templates to role {}", role);
//Create normal attributes templates
for (AbstractAttr attr : role.getAttrs()) {
final RAttrTemplate rAttrTemplate = new RAttrTemplate();
rAttrTemplate.setOwner(role);
LOG.info("Creating template for role normal attribute {}", attr);
final String schemaName = jdbcTemplate.queryForObject(
"SELECT schema_name FROM RAttr WHERE id = ?;", String.class, attr.getId());
rAttrTemplate.setSchema(schemaDAO.find(schemaName, RSchema.class));
newRattrTemplates.add(rAttrTemplate);
}
//Create derived attributes templates
for (AbstractDerAttr derAttr : role.getDerAttrs()) {