当前位置:
代码迷
>>
PHP
>> thinkphp mode的find方法失灵
详细解决方案
thinkphp mode的find方法失灵
热度:
67
发布时间:
2016-04-28 17:20:58.0
thinkphp mode的find方法失效
今天遇到一个奇怪的问题
使用 D('Custoemr')->find(1)语句没有sql执行,非常奇怪。
而用其他表的model的find方法却正常。再结合D('Custoemr')->add()方法不返回主键。
觉得问题应该出在主键上,于是再仔细检查customer表发现果不其然有两个主键。 其中一个是手误点上去的。
所以这里再次总结下,如果有表有多个主键,那么find和create方法都不会正常执行
查看全文
相关解决方案
国庆快活~ getHibernateTemplate().find 按时间最大查询
警告: Could not find action or result 什么原因?该如何解决
this.getHibernateTemplate().find()有关问题
cas客户端有关问题(unable to find valid certification path to requested target)
struts2 文件上载有关问题 Can not find a java.io.InputStream with the name [downloadFile]
Could not find a getter for name in class解决方法
Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your,该如何处理
关于Cannot find bean under name 的错误
Cannot find any information on property 'cipher' in a bean of type 'xx.JiamiBean解决思路
请问:org.apache.jasper.JasperException: Cannot find any information on property 'userPhone' in a bean of type 'Bean.Sender'
could not find jar tool executable.该如何解决
用eclipse打包jar后运行,弹出异常could not find main class
求教 this.getHibernateTemplate().find()步骤
myeclipse控制台程序运行报错:could not find the main class:org.apache.log4j.net.JMSSink.解决办法
this.getHibernateTemplate().find()如何用
myeclipse控制台程序运作报错:could not find the main class:org.apache.log4j.net.JMSSink
Android运行宝Automatic Target Mode: Preferred AVD 'myavd' is not available解决办法
Caused by: org.hibernate.PropertyNotFoundException: Could not find
有人用过zeroMQ吗?一直揭示C:\Program Files\Java\jre6\bin\jzmq.dll: Can't find dependent li
CMD 运作java XXX.class 出现Could not find the main class
!一个很弱的有关问题:VS2010 cannot find or open the PDB file
网站发布后<sessionState mode=""></sessionState>该如何设置
<sessionState timeout="30" mode="StateServer" /> 引发的有关问题
求教熟悉Entity Framework的大神,DbContext的Set<T>().Find()如何用
<authentication mode="Windows"/>出错,该如何处理
若要使他人能够在远程计算机上查看此特定异常信息的详细信息,请在位于当前 Web 应用程序根目录下的“web.config”配置文件中创建一个 <customErrors> 标记。然后应将此 <customErrors> 标记的“mode”属性设置为“Off
unable to find a version of the runtime to run this application解决办法
设置了customErrors mode="On" 报脚本异常
MakeThumbnail(string originalImagePath, string thumbnailPath, int width, int height, string mode)路径有关问题
关于xhtmlConformance mode= "Legacy"和updatepanel不兼容的有关问题