/** To-one relationship, resolved on first access. */
 public RandomElementCollection getCollection() {
   if (collection__resolvedKey == null || !collection__resolvedKey.equals(collectionId)) {
     if (daoSession == null) {
       throw new DaoException("Entity is detached from DAO context");
     }
     RandomElementCollectionDao targetDao = daoSession.getRandomElementCollectionDao();
     collection = targetDao.load(collectionId);
     collection__resolvedKey = collectionId;
   }
   return collection;
 }
 /** called by internal mechanisms, do not call yourself. */
 public void __setDaoSession(DaoSession daoSession) {
   this.daoSession = daoSession;
   myDao = daoSession != null ? daoSession.getRandomElementDao() : null;
 }