ByteArrayEntity: added createAndInsert. getPersistentState should also take name into account, since UserEntity.setPicture can change it.
CreateAttachmentCmd: use ByteArrayEntity.createAndInsert.
ByteArrayEntityManagerL added findById.