Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not get array type of PostgreSQL through QueryDslJdbcTemplate/Spring-Data #484

nabedge opened this issue Aug 26, 2013 · 3 comments


Copy link

@nabedge nabedge commented Aug 26, 2013

I would like to access the array type column on postgresql through QueryDslJdbcTemplate and spring-data .


  create schema qdslsampleuser;
  create table mytable (
      id bigint primary key
      ,myarray varchar(8)[]
  insert into mytable (id, myarray) values (1, array['a','b','c']);

The code:

  @ContextConfiguration(locations = { "classpath:applicationContext.xml" })

  public class SimpleTest {

    private static Logger logger = LogManager.getLogger();

    private QueryDslJdbcTemplate qdslTemplate;

    public void queryDslSample01() {"******** queryDslSample01 START ********");
        SQLQuery query = qdslTemplate.newSqlQuery();

        QMytable qMytable = QMytable.mytable;
        Mytable mytable = qdslTemplate.queryForObject(query, qMytable);

        // SQL statement will be executed.
        // But I can not get the resultSet as Mytable instance !"******** queryDslSample01 END {}", mytable.getMyarray()


This test will fail.
How to do that ?

All the sample code is on

  1. install postgresql9.x on localhost
  2. git clone
  3. mvn clean test (including querydsl metaclass generation)
timowest added a commit that referenced this issue Aug 26, 2013
Copy link

@nabedge nabedge commented Aug 27, 2013

Thank you Timo.
Would you tell me about is this bug or not ?
Should I version up to 3.x from 2.9.0.FIXED ?
But I can not use new one because I 'm using spring-data-jdbc-core that depends on 2.9.x .

Are there any work-arround ?

Copy link

@timowest timowest commented Aug 27, 2013

Using JDBC arrays is not yet supported.

@timowest timowest added this to the 3.5.0 milestone Aug 31, 2014
Copy link

@timowest timowest commented Sep 30, 2014

Released in 3.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.