Home
Advent Calendar
×
Sign in with twitter.
You can follow the user and hashtags.
Share your tips on social media.
Post relative tips.
If you have relative tips, click [Add relative tips] to post.
#cakephp でユニットテスト時にauto increment なカラムへの対応
@papettoTV
Jan 28th 2013, 14:53
5592 viewer
45 embed viewer
embed
auto increment なカラムをfixtureで値指定してると、テストでsave()(insert)したときに、duplicate keyで怒られる。なので、fixtureの指定部分を無くすと、fixtureデータ登録時にもauto incrementが効いて解決する。
Add relative tips
Tweet
Users who share this tip.
×
Embed this tip for your blog
HTML code
Loading...
Comments
Tags
#tipshare.info
#git
#cakephp
#cakephp2.0
Following
Sign in with twitter.