How is c.items.user.firstName different from c.items.itemName or c.items.seller?? (This is from the EJB 3 in Action book)
The difference between c.user.firstName and c.items.itemName (or c.items.seller) is the relationship between the entities. On page 360 of EJB 3 in Action is written:
You can navigate further to other persistence fields or association fileds using a single-value path expression. For example, say we have a many-to-one relationship between Category and User;
If you compare this now with the incorrect statements c.items.itemName and c.items.seller, then you find again on page 361 the answer why this statements are wrong
While using path expressions, keep in mind that you cannot navigate through the collection-value path expressions to access a persistence or association field...
With c.item
s.itemName and c.item
s.seller it is not clear which itemName or which seller do you want, because there is not only one unique.