.save on entities with inverses
entity Thread{ name :: String sticky :: Bool status -> ThreadStatus posts -> Set<Post> (inverse = Post.thread) forum -> Forum } entity Post{ content :: WikiText (name) author -> User thread -> Thread } Post{ content := "Een hele hoop dingen vallen onder algemeen." author := userHarmjan thread := threadAlgemeen }.save();
After the .save 3 post objects are created in the database, this code is in the init{}
Submitted on 9 November 2010 at 14:15
Log in to post comments