Re: select id returns null
prof_trg <[email protected]>
| Newsgroups | gmane.comp.java.springframework.user |
|---|---|
| Message-ID | <[email protected]> |
----------------------------------------------------------------------
private static final ParameterizedRowMapper<User> MAPPER = new
ParameterizedRowMapper<User>() {
@Override
public User mapRow(ResultSet rs, int row) throws SQLException {
User user= new User();
user.setFirstName(rs.getString("firstname"));
user.setLastName(rs.getString("lastname"));
return user;
}
};
----------------------------------------------------------------------
CV - Peinado Rodrigo-2 wrote:
>
> Hi, post the MAPPER's code.
>
>
> -----Mensaje original-----
> De: prof_trg [mailto:[email protected]]
> Enviado el: Lunes, 11 de Mayo de 2009 12:44 p.m.
> Para: [email protected]
> Asunto: [Springframework-user] 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.
> I'd like to add that other fields are well selected except the id, so I
> think the issue related to spring query, should I add some thing?
>
> Regards
> --
> View this message in context:
> http://www.nabble.com/select-id-returns-null-tp23485931p23485931.html
> Sent from the springframework-user mailing list archive at Nabble.com.
>
>
> ----------------------------------------------------------------------------
> --
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
> i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Springframework-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/springframework-user
> *** ADVERTENCIA *** - El contenido del presente mensaje y los archivos
> adjuntos que pudiera contener son privados, estrictamente confidenciales y
> exclusivos para su destinatario, pudiendo contener informacion protegida
> por
> normas legales y de secreto profesional. Bajo ninguna circunstancia su
> contenido puede ser transmitido o revelado a terceros ni divulgado en
> forma
> alguna. En consecuencia de haberlo recibido por error, rogamos contactar
> al
> remitente y eliminarlo de su sistema. No nos responsabilizamos por la
> integridad y la seguridad de este mensaje, ya que el mismo podria estar
> sujeto a manipulaciones ilegales de informacion. *** WARNING *** - The
> information transmitted is intended only for the person or entity to which
> it is addressed and may contain confidential and/or privileged material.
> Any review, retransmission, dissemination or other use of, or taking of
> any
> action in reliance upon, this information by persons or entities other
> than
> the intended recipient is prohibited. If you received this in error,
> please
> contact the sender and delete the material from any computer. The
> integrity
> and security of this message cannot be guaranteed and it may be subject to
> unauthorized amendment, for which we accept no liability.
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
> i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Springframework-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/springframework-user
>
>
--
View this message in context: http://www.nabble.com/select-id-returns-null-tp23485931p23487059.html
Sent from the springframework-user mailing list archive at Nabble.com.
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com