简体   繁体   中英

deleted records in Oracle database are still retrieved by REST endpoints

I've created a new Oracle database and table for my new spring boot rest API.

my API has 3 endpoints for insertion, deletion and retrieval. when I inserted the values from insert endpoint it is giving me a success message and also verified the insertion in the table.

for some reason, I've deleted the entries from the table using Oracle SQL Developer UI manually. When I try to hit the Retrieval endpoint I'm still able to see those entries

It looks weird that how can my API able to retrieve values even though they are not in the Database. I'm having these configurations for creating and drop table from the application.properties

# create and drop tables and sequences, loads import.sql
spring.jpa.hibernate.ddl-auto=none
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true;

but I've checked that there is no new table is created and the values are storing in the table which I created.

I've also included Transaction management in my Application class @EnableTransactionManagement

Can someone help me with this? I could provide more details if needed

Your transaction isnt commited after deleting it manually. Use commit after delete

 Commit

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM