Hi,

H2 just recently switched to Java 5. The class java.util.UUID was not
supported in Java 1.4.

I will implement support for java.util.UUID in the next release:
"java.util.UUID is now supported in PreparedStatement.setObject and
user defined Java functions. ResultSet.getObject() returns a
java.util.UUID when using the UUID data type."

You can try it out already by using the automated build at
http://www.h2database.com/automated/h2-latest.jar (see also
http://www.h2database.com/html/download.html ).

Regards,
Thomas

On Tue, Jun 16, 2009 at 4:44 PM, jgrasper<[email protected]> wrote:
>
> I am currently using Postgres as my Database, and I would like to use
> H2 for unit testing.
>
> Something that Postgres allows is this (with the latest JDBC driver):
>
>                UUID uuid = UUID.randomUUID();
>                PreparedStatement updateSales = null;
>
>                updateSales = c.prepareStatement("UPDATE COFFEES SET ID = ? 
> WHERE
> COF_TYPE = /'DECAFF/'");
>
>                updateSales.setObject(1, uuid);
>
>
> And it will be mapped to the native UUID type of Postgres in the
> Database (Not Binary or Byte[] or something).
>
> Any chance this would be possible with H2 in the near future?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to