download the latest vim (vim-7.1.293) source code (see http://www.vim.org/download.php), and compiled it: cd vim7 ./configure --with-features=huge make make install reference: http://soyunperdedor.com/node/24
2008-05-20

hibernate persist() vs save()

关键字: java
persist() is well defined. It makes a transient instance persistent. However, it doesn't guarantee that the identifier value will be assigned to the persistent instance immediately, the assignment might happen at flush time. The spec doesn't say that, which is the problem I have with persist(). per ...
  模型如下: @Entity public class User extends BaseEntry{ private String name; private int age; @OneToMany(mappedBy = "user", cascade=CascadeType.ALL) private Set<Article> articles = new HashSet<Article>(); ....... }   @Entity public class Article extends B ...
:delete_all is much faster than :destroy_all, it doesn't trigger any destroy callbacks on the associated object. :destroy_all iteratively call the associated objects's destroy method
2008-04-12

Reloading the Association

关键字: rails
Notice that the second time I invoke the association via user, the object_id remains the same. The related object has been cached. However, passing true to the accessor reloads the relationship and I get a new instance. >> ts = Timesheet.find :first => #<Timesheet:0x3454554 @attributes={“updated ...
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.
studyworks
  • 浏览: 295 次
  • 性别: Icon_minigender_1
  • 来自: 自己输入城市...
  • 详细资料
搜索本博客
存档
最新评论