Unsuccessful: alter table XXX drop constraint YYY in Hibernate/JPA/HSQLDB standalone

后端 未结 6 1563
忘掉有多难
忘掉有多难 2020-12-04 12:13

I am trying to run some Hibernate/JPA examples using an in-memory HSQL DB. The error message I get is the following:

13:54:21,427 ERROR SchemaExport:425 - HH         


        
6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-04 13:09

    We faced same issue while trying to create a simple login window in Spring. There were two tables user and role both with primary key id type of BIGINT. These we mapped (Many-to-Many) into another table user_roles with two columns user_id and role_id as foreign keys.

    The problem was the role_id column in user_roles table, it was of int type and not compatible for the foreign key to role. When the type was modified to BIGINT errors were rectified.

提交回复
热议问题