简体   繁体   English

Oracle 数据库中已删除的记录仍由 REST 端点检索

[英]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.我已经为我的新 spring 引导 rest ZDB974A238714CA3ACE4D634 创建了一个新的 Oracle 数据库和表。

my API has 3 endpoints for insertion, deletion and retrieval.我的 API 有 3 个端点用于插入、删除和检索。 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.出于某种原因,我手动使用 Oracle SQL 开发人员 UI 从表中删除了条目。 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.看起来很奇怪,我的 API 怎么能检索值,即使它们不在数据库中。 I'm having these configurations for creating and drop table from the application.properties我有这些配置用于从 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我还在我的应用程序 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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