Department logicDev = Department.createDepartment(ec, "987654321", "Logic Squad Development", logicsquad);
ec.saveChanges();
NSArray<Person> allPersons = Person.fetchAllPersons(ec);
for ( Person aPerson : allPersons) {
Partial_AuthenticatedPerson auth = aPerson.partialForClass(Partial_AuthenticatedPerson.class);
auth.setLastLoginDate(new NSTimestamp());
auth.setUsername( aPerson.firstName().toLowerCase() + "." + aPerson.lastName().toLowerCase() );
auth.setPassword( ERXCrypto.base64HashedString(auth.username()) );
}
}