Git Product home page Git Product logo

Comments (8)

lpandzic avatar lpandzic commented on May 16, 2024

Can you provide a project that reproduces the issue?

from infobip-spring-data-querydsl.

lpandzic avatar lpandzic commented on May 16, 2024

Based on everything posted it suggests something was misconfigured - #67 (comment)

from infobip-spring-data-querydsl.

lpandzic avatar lpandzic commented on May 16, 2024

Or in other words, genereated Q class should extend RelationalPathBase, not EntityPathBase. RelationalPathBase is used for Querydsl SQL module (spring data jdbc), and EntityPathBase is used for Querydsl JPA module (spring data jpa).

from infobip-spring-data-querydsl.

Tripio3000 avatar Tripio3000 commented on May 16, 2024

My problem is that two datasources are connected at once in the project. I go to one database through JPA and to the other through JDBC
With the use of JdbcTemplate everything worked successfully. But QueryDsl could not be configured.
I abandoned this idea when I saw that QueryDsl does not have a dialect for ClickHouse.

from infobip-spring-data-querydsl.

lpandzic avatar lpandzic commented on May 16, 2024

That shouldn't be a problem - you can use JDBC and JPA in the same project - the only question is how you're generating Q classes. JDBC annotation processor only detects @Id annotated classes and JPA uses JPA annotations.
Can you maybe provide a project that reproduces the issue or do you want to close this issue?

from infobip-spring-data-querydsl.

Tripio3000 avatar Tripio3000 commented on May 16, 2024

I can't share the project. It has commercial value.
But i can provide an entity example to fetch data using JPA:

@javax.persistence.Entity
@javax.persistence.Table(schema = "register", catalog = "rkn_erir_2", name = "v_media_creative_report")
@NoArgsConstructor
@Getter
@Setter
public class VMediaCreativeReportEntity {
    @javax.persistence.Id
    private UUID id;
    //...
}

This class uses javax.persistence.Id and class for querying by jdbc uses org.springframework.data.annotation.Id
I think the problem is not @id

from infobip-spring-data-querydsl.

lpandzic avatar lpandzic commented on May 16, 2024

I can't share the project. It has commercial value.

You don't need to share the project - only replicate the problem in project agnostic manner.
The code you shared isn't enough for me to replicate the issue - there are entity classes like that already that work within tests in the project itself.

Also, note that in last comment your code states @javax.persistence.Id and in the first comment it is @org.springframework.data.annotation.Id. That's the only clue I can see so far that can potentially cause issues depending on which infobip-spring-data-querydsl dependecies your project uses and this is once again why I ask for a minimum project that reproduces the issue.
Can you checkout this project and add try replicating your issue in a test?

from infobip-spring-data-querydsl.

lpandzic avatar lpandzic commented on May 16, 2024

I'm closing this down as stale. Feel free to reopen if you can provide more info or a reproduction.

from infobip-spring-data-querydsl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.