Yabe tutorial (1.0.2.1): different Post model in chapter 7?

Bug #562260 reported by Gilles Fabio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
play framework
Status tracked in 1.0
1.0
Fix Released
Undecided
Peter Hilton
1.1
Fix Committed
Undecided
Unassigned

Bug Description

I found an inconsistency in Yabe tutorial.

Code of the Post model in chapter 2:

@OneToMany(mappedBy="post", cascade=CascadeType.ALL)
public List<Comment> comments;

Code of the Post model in chapter 6:

@ManyToMany(cascade=CascadeType.PERSIST)
public Set<Tag> tags;

Now, code of the Post model in chapter 7:

@OneToMany(mappedBy="post", cascade=CascadeType.ALL)
public List<Comment> comments = new ArrayList();

@ManyToMany(cascade=CascadeType.ALL)
public Set<Tag> tags = new HashSet();

It's not the same code and there's no explanation about this change. Or I probably need new glasses :)

Revision history for this message
Peter Hilton (pedro-lunatech) wrote :

The final code in samples-and-tests/yabe has the same version as in chapters 2 and 6, where the 'comments' and 'tags' fields are not initialised at declaration, so I conclude that chapter 7 got out of sync with the final code.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.