Hi.

I am using H2 in some JUnit. In production, the Data Access Objects are 
connected to an Oracle. And I have the following table:

CREATE TABLE "USER"    (
   "ID" NUMBER, 
   "PASSWORD" NVARCHAR2(50), 
    "EMAIL" NVARCHAR2(50),
    "GUID" RAW(16) DEFAULT RANDOM_UUID()
   .....
  .....
);

I have a method to insert an user similar to:

stmt = con.prepareStatement(QUERY_INSERT_USER, new String[]{"ID", "GUID" });
stmt.setString(1, lowerCase(user.getEmail()));
stmt.setString(2, user.getPassword());
stmt.executeUpdate();

keys = stmt.getGeneratedKeys();

The ID is generated by a sequence and the GUID by the RANDOM_UUID function.

The problem is that with the Oracle JDBC Driver, I can read both values: ID 
and GUID. The H2 JDBC Driver always return only one field (the ID).

My question is: do I need another extra thing to read both values? Or is it 
a problem in the JDBC Driver? If this is the case, Is possible include this 
feature in future versions?


-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to