Closed f3l1x closed 9 years ago
Ok, primary key is compulsory, so Orm should throw an exception, if none is defined.
Orm already throws an exception. https://github.com/nextras/orm/blob/25ac237069852dd197ecdeb184c702bf609537e9/src/Mapper/Dbal/StorageReflection/StorageReflection.php#L81-L84 Otherwise, please provide some example which causes the problem. Also, I don't understand what does it mean that process is idle in transaction. The work "oukey" is weird too.
@hrach Can I ask you, why is forced to have to a primary key/s at storage?
To be able to uniquely identity a row
I have a table similar to tag_followers.
This is same SQL:
This table has no PRIMARY KEY, but only UNIQUE KEY.
Orm can not save this entity and process is idle in transaction. It was very difficult to find it. I don't know if it is a bug or right behaviour.
If it is oukey, some warning / trigger error would be nice.
What do you think?