qiusuo-fuyuan / qiusuo-backend

0 stars 0 forks source link

All - Initialize all collections when return from service layer #102

Open ryan-zheng-teki opened 3 years ago

ryan-zheng-teki commented 3 years ago

User Story We have put the transactional annotation on each service in order to move the session management from Repository to Spring. However, when we return from service layer, we have to initialize all the collection proxies. Otherwise in Mutation/Query layer, we will have exception for not being able to get the session as the session is already closed after the transaction

What To DO Find a way to initialize all the internal collections when returning from service layer.

Hints: This ticket might not be needed as we will use R2DBC instead of Hibernate in the future