Skip to content
Advertisement

Tag: spring-data

PageRequest constructors have been deprecated

I’m working the Spring Data Commons v2+ snapshot, and I see that the constructors for a PageRequest have been deprecated. This appears to have occurred between M1 & M2. Unfortunately, this is the only [real] implementation of the Pageable interface. I’m wondering where the effort is heading, and what a better alternative would be for current development. Answer It’s just

Change or override default Behavior of Mongorepository.save(document)

Is there any way to intercept or change the document before MongoRepository.save(e) updates it? I am trying to push a subproperty inside and array in a document. I have tried to manipulate DBObjects by implementing converter(using custom converter) but the $push operation did not work over there. I think to make it work I have to implement something like mongoOperation.update(dbObjectMatch,dbObjectUdate).

Spring data aerospike

I would like to work with Aerospike and use Spring Data. I found useful library for my goals here. However, but adding it to dependencies, this code from sample still could not find dependencies. Even less information could be find in the google. I’ve already tried to add another repos, like: Also, you could find example of project here. And

Return custom object from Spring Data with Native Query

My question is based on another post. How can I achieve the same with a native query? Native queries do not allow JPQL thus do not allow new instances either. My POJO. My database table contains coordinates for cities perimeter, so there are three columns: city_name, latitude, longitude. Each city contains lots (really, LOTS) of perimeter coordinates that will be

native query join in spring data

I have the class: I want to know if it’s possible to use a native query join in spring data JPA and if the result of query was correctly mapped into entities like the above example. Can someone show me a complete example to user this. I must to use a native query in my case and I am not

Optional pagination with Spring

I am pretty new to java and spring. What I want to implement is api endpoint /tickets with pagination and sorting. I made it and it works. But also what I would like to do is to return plain list of all tickets if size and page are not specified in the query params, so in FE I can use

Advertisement