Home > Backend Development > PHP Tutorial > javascript - collection的create方法不能向collection中添加model

javascript - collection的create方法不能向collection中添加model

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:18:16
Original
1350 people have browsed it

javascript - collection的create方法不能向collection中添加model

当184行的create方法第一次执行时,会触发152和153的事件;但是当create方法第二次执行时,就不会触发

服务端用的是php+mysql

回复内容:

javascript - collection的create方法不能向collection中添加model

当184行的create方法第一次执行时,会触发152和153的事件;但是当create方法第二次执行时,就不会触发

服务端用的是php+mysql

自己找到答案了,之前把model中的id属性设为0了。。。导致每次create都是update。。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
What are JavaScript hook functions?
From 1970-01-01 08:00:00
0
0
0
What is JavaScript garbage collection?
From 1970-01-01 08:00:00
0
0
0
c++ calls javascript
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template