Foreign key constraints are supported by InnoDB engine and NOT supported by MyISAM engine. This adapter by default assumes MyISAM, so {@link org.apache.cayenne.dba.JdbcAdapter#supportsFkConstraints()} will return false.Users can manually change this by calling setSupportsFkConstraints(true) or better by using an {@link org.apache.cayenne.dba.AutoAdapter}, i.e. not entering the adapter name at all for the DataNode, letting Cayenne guess it in runtime. In the later case Cayenne will check the table_type MySQL variable to detect whether InnoDB is the default, and configure the adapter accordingly.
|
|
|
|
|
|