by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 07:23

    sothawo on 3.2.x

    DATAES-937 - Repository queries… (compare)

  • 06:18
    christophstrobl closed #459
  • 06:18

    christophstrobl on DATACMNS-1762

    (compare)

  • 06:17

    christophstrobl on master

    DATACMNS-1762 - Remove Reactive… DATACMNS-1762 - Extract Nullabl… DATACMNS-1762 - Support Optiona… and 2 more (compare)

  • Sep 24 22:53
    jxblum synchronize #467
  • Sep 24 22:51
    jxblum edited #467
  • Sep 24 22:51
    jxblum edited #467
  • Sep 24 22:49
    jxblum synchronize #467
  • Sep 24 20:51
    jxblum edited #467
  • Sep 24 20:51
    jxblum edited #467
  • Sep 24 20:51
    jxblum edited #467
  • Sep 24 20:51
    jxblum edited #467
  • Sep 24 20:51
    jxblum opened #467
  • Sep 24 20:37

    sothawo on 4.0.x

    DATAES-937 - Repository queries… (compare)

  • Sep 24 20:14

    sothawo on master

    DATAES-937 - Repository queries… (compare)

  • Sep 24 20:14
    sothawo closed #525
  • Sep 24 20:13
    sothawo opened #525
  • Sep 24 19:19

    sothawo on 3.2.x

    DATAES-896 - Use mainField pro… (compare)

  • Sep 24 19:19
    sothawo closed #524
  • Sep 24 19:18
    sothawo opened #524
Dirk Luijk
@dirkluijk
As far as I know it's only in Spring Data JPA.
Mark Paluch
@mp911de
We felt that query construction requires a bit more polishing before we can expose it as public API since row mappers expect certain columns/column aliases for result mapping and right now, query creation isn't yet where it should be.
Dirk Luijk
@dirkluijk
Ah right, so I can't work with it you say. I was already using Conditions but I can't use JdbcQueryCreator either.
What is your advice regarding complex (criteria-like) queries? Throw in another library?
Knut Schleßelmann
@kschlesselmann
Can I somehow use the result of ReactiveAuditingEntityCallback to populate Created/LastModifiedBy in my own callback or how would I find out if the entity is new?
8 replies
Dirk Luijk
@dirkluijk
I implemented a simple Specification API for JDBC for our project. I put the code in a Gist: https://gist.github.com/dirkluijk/1004c178922646dc297c862608c39c48. Might be interesting.
I was not able to implement it in a DataAccessStrategy, so I took some shortcuts (which are fine for us)
Registering a custom RepositoryFactory was a bit tedious, might be cool if that's more easier in the future.

It's based on this interface:

interface SpecificationRepository<T> {
    fun findAll(specification: Specification): Iterable<T>
    fun findAll(specification: Specification, sort: Sort): Iterable<T>
    fun findAll(specification: Specification, pageable: Pageable): Page<T>
}

(I use Kotlin by the way)

rajkcv
@rajkcv
While creating Repostories, why an interface is used instead of classes
image.png
Can anyone please let me know?
drykod
@drykod_twitter
Does the RedisHealthIndicator actually act as a sort of keep alive on a Redis cluster? (if let's say calling the health check / readiness every 10 seconds). From what I think so far, it does not. I always reach the Redis servers timeout (5 minutes) and it always reconnect every node...
drykod
@drykod_twitter
(seems to only run a cluster slots)
SauriBabu
@SauriBabu
Hi, is it possible to use multiple schema name in single sql query in spring boot application?
I know multiple DataSource could be created.. but here my need is different from that
James Howe
@OrangeDog
@Table has a schema attribute, if that's what you mean.
James Howe
@OrangeDog
Hibernate: if you get a QuerySyntaxException on a ( does that mean the dialect isn't aware of the function?
James Howe
@OrangeDog
Maybe I'm doing it wrong, but registering the function in a custom dialect doesn't appear to have solved it
James Howe
@OrangeDog
Found the answer. You have to add = 1 or = true- https://stackoverflow.com/a/12976962/476716
Matt Henry
@matthenry87
Hey all. I'm trying to create an aggregation that uses the Atlas Search's '$search' pipeline stage. This is different from the normal text search, and is something offered via the managed Atlas MongoDB product. Is there any support for this?
I've tried to leverage mongoTemplate.getCollection().aggregate (), passing in an array of Document objects, but then I run into Codec issues when it tries to convert to my specified POJO :/
Matt Henry
@matthenry87
Solved it for now using an anonymous class, implementing the toDocument() on AggregationOperation and piecing together the $search pipeline operation.
Jonathan Kolberg
@j.kolberg_gitlab
Hi all. I'm having a problem with cors in spring data rest. I have a RepositoryInferface with CrossOrigin annotation and Cors prevents the browser javascript from doing a put to create an association for a OneToOne relationship
Cedrick Lunven
@clun

[SpringDATACassandra] is this a known issue that you cannot use nested Collections ? Is there a workaround ?

Table

create table refdata_mapping(
  source        text,
  destination   text,
  field_mapping map<text,text>,
  audit         list<frozen<map<text,text>>>,
  PRIMARY KEY ((source), destination)
)

Entity

@Table(value="refdata_mapping")
public class RefDataMapping {
    @PrimaryKeyColumn(value="source",ordinal=0,type= PrimaryKeyType.PARTITIONED)
    private String source;

    @PrimaryKeyColumn(value="destination",ordinal=1,type= PrimaryKeyType.CLUSTERED)
    private String destination;

    @Column(value="field_mapping")
    private Map<String,String> fieldMapping;

    @Frozen
    @Column(value="audit")
    private List<Map<String,String >> audit;

Error on findbyId => codec not found for requested operation [map<varchar,varchar> <-> java.util.Map]

Mark Paluch
@mp911de
@clun sounds like a bug. Can you file a ticket at https://jira.spring.io along with a minimal reproducer?
Cedrick Lunven
@clun
Thank you @mp911de . Will do
Fly-Away
@Fly-Away
Hi is spring data envers support auditing along with mongodbrepository? I usually use it in JpaRepository with postgres db only
Mark Paluch
@mp911de
Envers is an Add-on to Hibernate. MongoDB isn't affiliated with Hibernate at all
Rohan Kumar
@rohanKanojia
Hi guys, I'm trying to access couchbase db running in kubernetes from spring
I have defined connection configuration like this:
~/work/repos/kubernetes-java-sample/maven/webapp : $ cat src/main/resources/application.properties 
spring.couchbase.bootstrap-hosts=192.168.39.77
spring.couchbase.bootstrap-port=32099
spring.couchbase.bucket.name=books
spring.couchbase.bucket.password=123456
However, this doesn't seem to override default port. It gives me this error: java.net.ConnectException: Connection refused: /192.168.39.77:8091
Does anyone know how to override default port in spring data couchbase?
Adrien Lecharpentier
@alecharp
Hello @mp911de. From spring-data-envers issue tracker, and local experimentation, something changed recently which breaks the library behaviour. spring-projects/spring-data-envers#250 sums up exactly what I'm facing. If you (or anyone) could have a look it would be great. Thanks!
Christopher Davis
@cdavispax8
Hi all, how would I go about using aggregates in a spring data elasticsearch query? Do I have to write the query out manually?
The example is I have an index containing products and I just need to see a distinct list of vendors among those products.
1 reply
Al Grant
@bigal_nz_twitter

I have this:

public interface PlanServiceUserGen extends PlanService {
    Optional<PlanTaskViewDTOUserGen> getPlanWithTasks(Long id);
}

but there is no method on PlanService defining getPlanWithTasks - so how is this even working? (As it stands it only retreives one of the linked Tasks)

Fly-Away
@Fly-Away

Envers is an Add-on to Hibernate. MongoDB isn't affiliated with Hibernate at all

I see thank you.

How about using r2dbc with envers? I need reactive library with database auditing tool like envers, any database will do, nosql or rdbms

Mark Paluch
@mp911de
Spring Data R2DBC isn't using JPA/Hibernate either.
Fly-Away
@Fly-Away

Spring Data R2DBC isn't using JPA/Hibernate either.

Oohh i see, is there any auditing library for Spring Data R2DBC?

Mark Paluch
@mp911de
Spring Data R2DBC ships with built-in auditing support, that is the created/modified user and date
Fly-Away
@Fly-Away

Spring Data R2DBC ships with built-in auditing support, that is the created/modified user and date

Woah very cool, did it have auto create a revision info table pr some audit table with revision history?

Jiddere Jnr
@chairmo

Some should help me here please, I am unable to post from my the front. this is my code: @Entity
@Getter
@Setter
public class Education extends BaseEntity {

private String school;
private String gradeObtained;
@ManyToOne(fetch = FetchType.LAZY)
private Qualification qualification;
@ManyToOne(fetch = FetchType.LAZY)
private Courses course;

}
@Entity
@Getter
@Setter
public class Qualification {
private String name;
}

//service
@Transactional
@Override
public Education addEducation(Education record) {
return repository.save(record);
}

//json

{ "school": "OAU",
"gradeObtained": "2.2",
"qualification": 4,
"course": 10,
"startDate": "14/10/2001",
"finishDate": "15/12/2019",
"ippis": "4133"
}

Jiddere Jnr
@chairmo
no int/Int-argument constructor/factory method to deserialize from Number value (4); nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of com.chairmo.staffcadre.model.entities.Qualification (although at least one Creator exists):
Jiddere Jnr
@chairmo
Any help please any
one here
顾凡
@GuideFourthW
@karshil2309