From: Bayless K. <bk...@co...> - 2007-11-16 22:04:16
|
James, The way I have done it after converting from another DB is create a table named dual (or whatever is appropriate for your database) with just a dummy column. That may not be the cleanest way but it seems easy when converting. Actually, I have then used the table for other information but still with just one row although I don't think the number of rows would make any difference. The SQL is just: CREATE TABLE DUAL (DUMMY VARCHAR(10)) Bayless ----- Original Message ----- From: "James Adams" <mon...@gm...> To: <hsq...@li...> Sent: Tuesday, November 06, 2007 11:16 AM Subject: [Hsqldb-user] How can I get a sequence from in-memory HSQLDB? (missing 'dual' table) > > I am trying to use an in-memory HSQLDB for unit testing of my Hibernate > DAOs > with DbUnit. I am running into a problem because my POJOs use sequence as > the identifier generation strategy and Hibernate complains that there is > no > table named 'dual' in HSQLDB, which is where it's trying to get a sequence > value (i.e. select hibernate_sequence.nextval from dual). Can someone > suggest a workaround for this? Maybe I need to first create a table named > dual at the start of my DbUnit test? If so then what's the SQL I would > use > for this? > > Thanks in advance for any suggestions. > > --James > -- > View this message in context: > http://www.nabble.com/How-can-I-get-a-sequence-from-in-memory-HSQLDB--%28missing-%27dual%27-table%29-tf4759577.html#a13611178 > Sent from the HSQLDB - User mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Hsqldb-user mailing list > Hsq...@li... > https://lists.sourceforge.net/lists/listinfo/hsqldb-user > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.503 / Virus Database: 269.15.34/1134 - Release Date: > 11/16/2007 9:52 AM > > |