我有User和Role模型擴展了Catalyst's Sentinel包。 如果我使用默認遞增主鍵,一切正常。當我將其更改爲使用UUID時,它的行爲很奇怪。一切工作正常,除了一點細節。 這裏的code snippet檢查User是否屬於Role與否: public function inRole($role)
{
if ($role instanceof RoleInterface)
PostgreSQL的: create extension if not exists "uuid-ossp";
select uuid_generate_v3(uuid_nil(), 'this is a test');
uuid_generate_v3
--------------------------------------
e1e27115-9f5b-366d-9