Comments (4)
Hi, can you please share more details? Usually, there are two types of validation:
- Validation on persistence (Hibernate configuration)
- Validation on request (Spring MVC)
Please show the repositories you are using as well as the invoking code and share the exact expectations.
from blaze-persistence.
I am talking about validation on persistence. Validation of request bodies is working as expected.
So in this case the email validation works fine as request validation but not when saving a view.
@EntityView(User::class)
@CreatableEntityView
interface InviteUserView {
@get:IdMapping
val id: UUID
@get:Email
var email: String
}
@Transactional
interface InviteUserViewRepository : EntityViewRepository<InviteUserView, UUID> {
fun save(user: InviteUserView): InviteUserView
}
@Service
class SomeUserService @Autowired constructor(
private val repository: InviteUserViewRepository,
) {
fun saveUser(user: InviteUserView): InviteUserView {
return repository.save(user)
}
}
The repositories are scanned via @EnableBlazeRepositories("....")
.
from blaze-persistence.
Ok, so validation of creatable/updatable entity views is currently not automatically done when an object is passed to some save
method. I'll mark this as feature request then.
from blaze-persistence.
Ok, thanks!
from blaze-persistence.
Related Issues (20)
- Re-using ObjectMapper from spring-boot for EntityViewAwareMappingJackson2HttpMessageConverter leads to issues HOT 3
- Allow multiple named subqueries for @MappingSubquery
- Optimization of logging in the AnnotationUtils Utility Class HOT 1
- FR: Support field-EntityView deserializatin for DTOs which are non-entity views
- Expose EntityViewAwareMappingJackson2HttpMessageConverter as a Bean to support re-usage for http-clients
- Property naming strategy for Jackson integration does not work HOT 3
- How to ignore a certain `Getter` in EntityView? HOT 1
- Query DSL with blaze-persistence is generating an extra joining HOT 6
- SubviewAttributeFlusher always cascade deletes
- Exception thrown when using LocalDate in an EntityView being fetched using the Multiset strategy
- Startup error with Spring Boot 3.3.0 and Blaze Persistence Repositories HOT 5
- "No viable alternative at input" error near 'entity_function' HOT 1
- Exception thrown when using subQuery + pagedList HOT 1
- Fetching of MULTISET attribute not working HOT 3
- Question. Can i use fields mapped as @Convert in multiset mode? HOT 1
- Cannot invoke "EntityType.getName()" because the return value of "JoinNode.getTreatType()" is null HOT 1
- Pagination in queries that join on an @OneToMany or @ManyToMany attribute return duplicate results HOT 1
- IS NOT NULL not possible in correlationExpression HOT 3
- Exclude Certain Attributes in View HOT 2
- Simple query with an EXISTS clause and pagination adds an unnecessary inner ID query HOT 1
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 blaze-persistence.