before save={"amount":"11","app":"1234567890","channel":"balance","currency":"cny","idcard":"120702196009022114","livemode":0,"order_no":"123","org_id":"1234567890","remarks":"this is the test 05","suminsured":"10","time_expire":"2016-05-14 12:22:25"}
after save={"amount":"11","app":"1234567890","channel":"balance","currency":"cny","id":"ba1bbf94f87749c68acc516c8c0ee7c0","idcard":"120702196009022114","livemode":0,"order_no":"123","org_id":"1234567890","remarks":"this is the test 05","suminsured":"10","time_expire":"2016-05-14 12:22:25"}
order1={"amount":"11","app":"1234567890","channel":"balance","currency":"cny","id":"cb72c9f7e3364808aba7609aaeb76f3c","idcard":"120702196009022114","livemode":0,"order_no":"123","org_id":"1234567890","remarks":"this is the test 05","suminsured":"10","time_expire":"2016-05-14 12:22:25"}
发布评论
评论(3)
_save()是什么鬼?
model的sava方法被我重写过,加入了默认主键生成:
保存对象部分的代码:
其中打印信息如下:
可以看到after save时的id的值与order1时的id 的值不同
没看仔细,再多看两眼就好