Giter Club home page Giter Club logo

Comments (1)

rvanderwerf avatar rvanderwerf commented on June 7, 2024

I am having a similar issue but it's a little bit different. If I have one class that hasMany of another, using discriminator multi-tenancy, and I do an 'in' query like (can be a criteria or where query)

SomeObject.where {
    childObjects in childObject
}

I get a sql error exception, the sql is not properly filling in the in query value causing this exception:

java.sql.SQLException: No value specified for parameter 4

The sql looks like this:

select
       some cols
    from
        some_object this_ 
    where
        ? = this_.tenant_id 
        and this_.date_created=? 
        and this_.id in (
            ?
        ) limit ?

values:

TRACE org.hibernate.type.descriptor.sql.BasicBinder - binding parameter [1] as [VARCHAR] - [sometenant]
TRACE org.hibernate.type.descriptor.sql.BasicBinder - binding parameter [2] as [TIMESTAMP] - [null]
ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - No value specified for parameter 4

Actually, it's not even making the right query, it should be joining the child table instead it appears to be doing an 'in' query on the parent tables ID. This is problem related but a little different, so I can raise a separate issue with a different example of code.

from gorm-hibernate5.

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.