Thursday, January 3, 2013

Re: queries on HABTM relationships

Broken for CakePHP or broken in general?
Generally, I would not see a problem in using a non-numeric primary key, you just have to be conscious of the constraints this imposes.

If it is for a constraint of CakePHP, well I didn't experience any problem with that yet. There is no error in queries. And permissions would be used as a read-only model, so no problem with the absence of auto-increment.

Anyway....I moved the permission entities out the db, they just didn't make sense there since they are never going to change during the life of the website.

On Thursday, January 3, 2013 8:03:24 PM UTC+1, cricket wrote:
On Wed, Jan 2, 2013 at 8:32 PM, Stefano Campanella
<leon...@guildofmessengers.com> wrote:
> Yes I am sure. In my case id is not numeric, the permission name is already
> an identifier for the permission

Your DB schema is broken by design, then. Good luck with that.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

No comments: