use Service layer to persist data into database. But the Unit Test does not have this problem. I turn on debug and check the log file carefully. In the place where data should inert into database, I find the information: “delaying identity-insert due to no transaction in progress”
Share
the issue was due to @Transaction and @Autowire
my generic dao was autowired and when we @Transaction it is unable to wrap my service class by transaction proxy class thus .It executes without saving data and without giving any error except the message as “delaying identity-insert due to no transaction in progress”.
I removed the autowire and injected manually the genric dao object and it starts working.