code: @Override
  	public void prepare() {
  		List<Log> logs = global.logs();
  		Object parent = null;
  		
  		for (int i = logs.size() - 1; i >=0; i--) {
  			if (logs.get(i).operation() != Log.Operation.GET) {
  				parent = logs.get(i).entity();
  				break;
  			}
  		}
  		
  		Lock lock = new Lock(global.id(), KeyFactory.createKeyString(
  				Keys.create(Translation.toKind(parent.getClass()), Entities.keyValue(parent)), 
  				Translation.TRANSACTION_KIND, 
  				global.id()), new Date());
  		datastore.put(local, Translation.toEntity(lock, Keys.create(
  				Translation.toKind(entity.getClass()), Entities.keyValue(entity))));
  		local.commit();
  		this.lock = lock;
  	}
docs: Allocates lock for the managing entity.