Jira issue originally created by user gektor:
<entity name="Default*Model*Test" table="test">
<id name="id" type="integer" column="id">
<field name="blabla" column="blabla" type="boolean"/>
<one-to-one field="user" target-entity="Users*Model*User">
<join-column name="users_id" referenced-column-name="id" on-delete="CASCADE" on-update="CASCADE" unique="false" />
CREATE TABLE test (id INT AUTO*INCREMENT NOT NULL, users_id INT DEFAULT NULL, blabla TINYINT(1) NOT NULL, UNIQUE INDEX test_users_id_uniq (users*id), PRIMARY KEY(id)) ENGINE = InnoDB;
ALTER TABLE test ADD FOREIGN KEY (users_id) REFERENCES users(id) ON UPDATE CASCADE ON DELETE CASCADE;
UNIQUE INDEX testusers_id_uniq (usersid)
INDEX testusers_id (usersid)
Comment created by @beberlei:
Verified, i just don't understand why you are using a one-to-one relation and then "deactivate" the database constraint for this. You could easily use Many-To-One
Comment created by gektor:
You are right. It's not a bug, it's feature.
This might still be a good improvement to allow the flexibility, but its not a bug. Updating to "Minor Improvmenet for 2.x"