@Override public void fromStream(final ODocument iSource) { if (document != null) return; document = iSource; roles = new HashSet<ORole>(); final Collection<ODocument> loadedRoles = iSource.field("roles"); if (loadedRoles != null) for (final ODocument d : loadedRoles) { if (d != null) { ORole role = createRole(d); if (role != null) roles.add(role); } else OLogManager.instance() .warn(this, "User '%s' is declared to have a role that does not exist in the database. Ignoring it.", getName()); } }