Skip to content

NullPointer Exception on null values using Projections.map #778

Description

@dmiorandi

Consider this trivial query. It seems that if there is a null value in resultset
Projections.map generate a null pointer exception. Is it something wrong on my code or is it a bug?

        SQLQuery query=queryDslJdbcTemplateViaHibernateSession.getQuery();
        QSQL_Domande domande=QSQL_Domande.Domande;
        Map<Expression<?>, ?> resultSet=query.from(QSQL_Domande.Domande)
                .where(QSQL_Domande.Domande.handicap6675CertificatoDa.isNull()).singleResult(
            Projections.map(QSQL_Domande.Domande.iDDomanda,QSQL_Domande.Domande.iDEnteErogatore,QSQL_Domande.Domande.handicap6675CertificatoDa)
        );

        //TODO: bug querydsl here???
        Object a=resultSet.get(domande.iDDomanda);
        Object b=resultSet.get(domande.iDEnteErogatore);
        Object c=resultSet.get(domande.handicap6675CertificatoDa);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions