简体   繁体   中英

ZF2 Doctrine create entity whitout primary key

I have a Oracle view table. I want to create a class Entity of this View, but I get this error:

No identifier/primary key specified for Entity "PortalAtendimento\Entity\VWAtendimentoContexto". 
Every Entity must have an identifier/primary key.

How can I can create a Entity without a primary key?

Bottom line, you can't. You can create an object (view/table) with an identifier that you won't use but Doctrine will require one to be present

Every Entity must have an identifier/primary key.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM