If you have:
1) modeled a primary key as an ObjAttribute, like customerPK
2) modeled it as an object type, like java.lang.Long
3) are using the Cayenne-Generated (Default) PK generation strategy
Then Cayenne won't generate any PKs for the entity and will just use zero over and over. This can be worked around by switching the attribute's type to a primitive (like long).