Announcement Announcement Module
Collapse
No announcement yet.
select Id returns null Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment

    Working...
    X