I think you need an <unknown-pk> configuration.
I'm using postgres with something like that:
I don't know the specific configuration for hsqldb
No need for unknown-pk. Just mark the pk field as <auto-increment/>
thanks but still no cigar.
still getting exactly the same error as before:
Could not create entity:java.sql.SQLException: Try to insert null into a non-nullable column in statement [INSERT INTO ARTISTENTITY (artistName, recordLabel) VALUES ('default name', 'default label')]
also tried the unknown-pk which didn't work.
Is it the responsibility of jboss or hypersonic to manage incrementing the pk as the insert statement seems to indicate that jboss is not looking after the pk.
OK, phaps ignore previous post, I don't think the db tables were being recreated. After a restart, deployment gives me this error. I've checked the hypersonic docs and BIGINT is the correct translation for a java.lang.Long PK.
java.sql.SQLException: Wrong data type: ID in statement [CREATE TABLE ARTISTENTITY (id BIGINT NOT NULL IDENTITY, artistName VARCHAR(256), recordLabel VARCHAR(256), CONSTRAINT PK_ARTISTENTITY PRIMARY KEY (id))])
Looks like IDENTITY can't be defined on BIGINT. Also you should <pk-constraint>false</pk-constraint> for the entity because Hypersonic does not support IDENTITY and PRIMARY KEY constraint at the same time. So the statement should look like
CREATE TABLE ARTISTENTITY (id int NOT NULL IDENTITY, artistName VARCHAR(256), recordLabel VARCHAR(256))
I'm having the same problem. Nathan, can you post your jbosscmp-jdbc.xml file? I'm all over the board on this and seeing yours would help.