| From: | Miłosz Tylenda <mtylenda(at)gmail(dot)com> |
|---|---|
| To: | pgsql-jdbc(at)postgresql(dot)org |
| Subject: | Re: Support of getting generated keys in driver version 8.4devel |
| Date: | 2009-01-05 09:30:11 |
| Message-ID: | 35a0a1a4-cb6e-491c-9a34-39c942bbb814@z27g2000prd.googlegroups.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
> I intentionally left supportsGetGeneratedKeys false because we don't
> support returning generated keys by column indexes. Without knowing how
> used that method is, I'm not sure if this is more or less helpful. I'm
> open to input if people think we should change it to true.
Kris, my picture is that I work with Apache OpenJPA - an object-
relational mapper. OpenJPA checks whether generated keys are supported
by calling DatabaseMetaData.supportsGetGeneratedKeys(). If true, the
generated keys are retrieved from PreparedStatement by giving column
names. If false, a second query is executed to get the value of
sequence associated with serial column. So, in the OpenJPA context,
supportsGetGeneratedKeys returning true would be more helpful, but I
can also imagine a case where it would break things.
Greetings,
Milosz
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Miłosz Tylenda | 2009-01-05 09:39:18 | Re: Support of getting generated keys in driver version 8.4devel |
| Previous Message | Kris Jurka | 2009-01-05 04:37:33 | Re: help please |