Results 1 to 2 of 2

Thread: select Id returns null

  1. #1
    Join Date
    Feb 2009
    Posts
    10

    Default select Id returns null

    Hello,
    I am using postgresql, and spring jdbc, and when I tried to execute a select query :
    Code:
     
     private SimpleJdbcTemplate template;
    List<User> res = template.query("select * from user where id=?", MAPPER, id);
    I don't know why the returned id is null, I'd like to add that the id is of type BIGSERIAL in postgresql, and I get it as Long in java.
    do you have an idea? is this problem related ot spring query?
    Regards

  2. #2
    Join Date
    Feb 2009
    Posts
    10

    Default

    Hello,
    no idea about that?
    in fact, the id is Long in java corner, should I specify some thing else to spring to bind the Long to BIGSERIAL, , I'd like to add that I face this problem only with select query, but when I have an instance of user and I try to get the id by;user.getId(), I get it successfully!
    I hope some one could help me!
    Regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •