I am developing an application that has 3 servers to deploy: dev, home prod. In the database, we have some views from others databases. In development, we have control of our DB and we can create a view and insert some data to test. In dev and production, we do not control DB. So, some views are not created yet.
I have a to like this
public class myDTO {
Long id;
Double quantity;
Map<String, Double> loadTypes; // come from view
}
I have a method findAll
in a @Transactional
class that get loadTypes
from DB, but as my class is @Transactional
when I try to access the Table I got error 500 and myDTO
is not returned, I want to return the rest of the DTO even when view that I need to access to get loadTypes
does not exist. Is there a way that I could do that?
I am getting this error
org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Transaction marked as rollbackOnly
at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:526)