I'm writing a `@Transactional` method that 

1. updates an entity (Service1.update)
2. call another `@Transactional` method in another service that make some calculation (involving also the current updated entity) (Service2.calculate)

My problem is that in the point 2, I make a select that involves also the current updated entity. The outer transaction is not committed yet and the select load the old entity values. So the calculus are based on old values.

```
class Service1{

    @Autowired
    private Service2 service2;

    @Transactional(readOnly=false)
    public update(final Entry entry) {

        repository.save(entry);
        // already tried to flush session injecting entityManager 
        //or to call saveAndFlush, but it doesn't works!

        service2.calculate(entry.getContainer());
    }
}

class Service2{

    @Transactional(readOnly=false)
    public calculate(final Container entry) {
        //do the job: calculate the sum of the power of each entity grouper by category
        List<Report> report = calcRepository.calculate(entry);

        //here the report is filled with sum composed also by the of old value of current entity

    }
}

class CalcRepository extends PagingAndSortingRepository{
    @Query("select new Report(" +
            "a.type, " +
            "a.combust, "+
            "a.container.id, "+
            "sum(a.power)) "+
            "from Entry a " +
            "where ..... " +
            "group by a.type, a.combust")
    List<Report> calculate(@Param("container") Container container);
}

```

I'm doing that select in order to get grouped values for current container: every time I modify an entity I must recalculate values of its container.

How can I solve this issue? Thank you