Adding a non incremental primary key

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding a non incremental primary key

Jireh Padua
Hi,

I'm using Cakephp 3.0 and I'm about to create a table which uses a non-incremental primary key (product code).

I've been searching for this on google but couldnt' find one...

Can I have a help from you?

Thanks! 
God bless! 

--
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 unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Adding a non incremental primary key

John Andersen
Does your product code contain meanings, ie. part of the product code symbolized something specific?

If so, I would just go with a normal auto-incrementing primary key and just make the product code a unique column in the table.

Enjoy, John

On Friday, 20 November 2015 13:53:12 UTC+2, Jireh Padua wrote:
Hi,

I'm using Cakephp 3.0 and I'm about to create a table which uses a non-incremental primary key (product code).

I've been searching for this on google but couldnt' find one...

Can I have a help from you?

Thanks! 
God bless! 

--
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 unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.