Comments (2)
Oliver Drotbohm commented
There's two major reasons we don't expose an delete(ID id)
yet. The first one is that the EntityManager
only exposes a remove(Object entity)
int the first place so that it is rather simple to do that. The second point aligns to you're requirement of not loading the entity at all. To achieve that we'd have to trigger a JQPL query which - according to the spec - does not cause related entities to be updated or deleted. This would the create a delta in the semantics of delete(T entity)
and delete(ID id)
which is a bit inconvenient.
Having that said, I perfectly get your point of deleting an entity by id just from a convenience point of view. So I think we could add an delete(ID id)
method that uses findOne(ID id)
under the hood and would thus save you one call to the repository plus execute the operation in a single transaction then
from spring-data-commons.
Oliver Drotbohm commented
Added method to the interface as well as implementations for JPA and Mongo
from spring-data-commons.
Related Issues (20)
- IteratorSpliterator returns estimateSize which violates Spliterator's contract breaking parallel stream processing HOT 7
- Document `ExtensionAwareEvaluationContextProvider` mechanism
- Provide out of the box client-side support for Pageable/Page encoding/deserialization HOT 1
- `NoClassDefFoundError` when processing reflection hints for `PageModule`
- ParameterizedTypeReference<CollectionModel<EntityModel<>>> returns empty content from RestTemplate / WebClient HOT 2
- Invalid parent parameter provided to static inner class constructors HOT 6
- Document converter types supported by `CustomConversions`
- Kotlin constructor detection fails during `KType` derivation HOT 1
- ReactiveCrudRepository.save is loosing Tracing context HOT 3
- Release 3.1.10 (2023.0.10)
- Release 3.2.4 (2023.1.4)
- Release 3.3 M2 (2024.0.0)
- Pagination / Sort support in http interface client
- How do I add converter from Instant to org.joda.time.DateTime to spring-data-commons-3.2.1 and spring-data-cassandra-4.2.1 HOT 1
- Add `ValueExpression` infrastructure for query methods
- `TypeDiscoverer` uses single-level nesting for generics comparison HOT 3
- Spring-Data-Commons Upgrade is causing MongoDB driver to throw CodecConfigurationException HOT 3
- Redunant code in DefaultEntityCallbacks#callback
- Auditing triggers unintended persistent entity creation for collection like types (List, Set,...) HOT 3
- Introduce standardized interfaces for published application events HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-data-commons.