code: public Repository getRepository() {
  		if (!isInTransaction()) {
  			throw new IllegalStateException("Repository may only be accessed from within a " + Transaction.class.getSimpleName());
  		}
  		if (repository == null) {
  			repository = Repository.create(Application.getInstance());
  		}
  		return repository;
  	}
docs: The backend repository may only be accessed within a transaction. You
  must <b>not</b> call getRepository from somewhere else or you will get an
  IllegalStateException. To simply read or write an entity use the static
  read or insert methods.
  
  @return the main/backend repository
  @throws IllegalStateException
  if currently no transaction is active