I recently discovered some bad sql where a NUMBER column was foreign keyed to a VARCHAR2 column in my unit tests. I would have expected this to throw an error when this was created. Instead, I was getting data conversion errors at runtime.
Here is a simplified version of the guilty sql: CREATE TABLE user_info ( user_info_id VARCHAR2(32) NOT NULL, user_password_md5 VARCHAR2(32) NOT NULL); ALTER TABLE user_info ADD CONSTRAINT user_info_pk PRIMARY KEY(user_info_id); CREATE TABLE user_ref ( user_ref_id VARCHAR2(32) NOT NULL, user_info_id NUMBER(9) NOT NULL, some_info VARCHAR2(32)); ALTER TABLE user_ref ADD CONSTRAINT user_ref PRIMARY KEY(user_ref_id); ALTER TABLE user_ref ADD CONSTRAINT ui_ur_fk FOREIGN KEY (user_info_id) REFERENCES user_info(user_info_id); In Oracle, this will throw an error. Any chance H2 can do the same? Thank you, Clinton --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
