Re: java.util.UUID to postgres uuid column

2010-02-28 Thread Larry Meadors
perators can be used. All column constraints > and properties, except IDENTITY, can be used on the uniqueidentifier data > type. > > Merge replication and transactional replication with updating subscriptions > useuniqueidentifier columns to guarantee that rows are uniquely identified >

Re: java.util.UUID to postgres uuid column

2010-02-28 Thread Vikram Subbarao
*From:* Vikram Subbarao [mailto:vikra...@directi.com] *Sent:* 11 February 2010 10:13 AM *To:* user-java@ibatis.apache.org *Subject:* Re: java.util.UUID to postgres uuid column Does not work - com.ibatis.common.beans.ProbeException: There is no READABLE property named 'value

Re: java.util.UUID to postgres uuid column

2010-02-11 Thread Vikram Subbarao
Try #value#, this will use your parameter object directly. Using #id# tries to obtain the id property from it. *From:* Vikram Subbarao [mailto:vikra...@directi.com] *Sent:* Thursday, February 11, 2010 7:50 AM *To:* user-ja

RE: java.util.UUID to postgres uuid column

2010-02-11 Thread meindert
com] Sent: 11 February 2010 10:13 AM To: user-java@ibatis.apache.org Subject: Re: java.util.UUID to postgres uuid column Does not work - com.ibatis.common.beans.ProbeException: There is no READABLE property named 'value' in class 'java.util.UUID' Niels Beekman wrote:

Re: java.util.UUID to postgres uuid column

2010-02-11 Thread Vikram Subbarao
id property from it. *From:* Vikram Subbarao [mailto:vikra...@directi.com] *Sent:* Thursday, February 11, 2010 7:50 AM *To:* user-java@ibatis.apache.org *Subject:* Re: java.util.UUID to postgres uuid column With this approach i t

RE: java.util.UUID to postgres uuid column

2010-02-10 Thread Niels Beekman
: java.util.UUID to postgres uuid column With this approach i tried this in a query - SELECT users.* FROM users WHERE id = #id# When i call this query as - sqlMapClientTemplate.queryForObject("User.findById", id); Note: id is an java.util.UUID

Re: java.util.UUID to postgres uuid column

2010-02-10 Thread Vikram Subbarao
With this approach i tried this in a query - resultMap="fullResult" cacheModel="cache"> SELECT users.* FROM users WHERE id = #id# When i call this query as - sqlMapClientTemplate.queryForObject("User.findById", id); /Note: id is an java.util.UUID object

Re: java.util.UUID to postgres uuid column

2010-02-09 Thread Larry Meadors
This might work: public class UUIDTypeHandler implements TypeHandlerCallback { @Override public void setParameter(ParameterSetter setter, Object parameter) throws SQLException { setter.setObject(parameter); } @Override public Object getResult(ResultGetter getter) throw

java.util.UUID to postgres uuid column

2010-02-09 Thread Vikram Subbarao
I am using postgres db and would like to map a java.util.UUID to a postgres uuid column. Latest postgres driver supports mapping of this if i was directly creating my prepared statements but since i use ibatis inbetween, i am unable to achive this as ibatis does not seem to understand that java