2008-04-12
The difference between << and create
关键字: rails
1. << is transactional, create is not
2. << method triggers the :before_add and :after_add callbacks, but the create method does not
3. << method returns operation_success ? association_proxy : false, while the create method returns the new instance created.
2. << method triggers the :before_add and :after_add callbacks, but the create method does not
3. << method returns operation_success ? association_proxy : false, while the create method returns the new instance created.
发表评论
最近加入圈子
最新评论
-
又一个DynamicDao
呵呵,老大你写的东东,不错。我学习了(刚刚一新手哈!) 不过,要是再写一点注释就 ...
-- by heshencao -
又一个DynamicDao
实现Query Annotation的主要代码如下: public class ...
-- by studyworks -
又一个DynamicDao
Norther 写道 没看出来dynamic在哪?就是自己实现了一套Crite ...
-- by studyworks -
又一个DynamicDao
没看出来dynamic在哪?就是自己实现了一套Criteria,而且Generi ...
-- by Norther







评论排行榜