The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

I was terrified looking at code for chapter 5 and 6 (events) and seeing Domain model classes annotated with @Entity
And more then one year later the final version of book is out, but problems I reported here are not addressed at all. I am so disappointed.
For inner join


select i from Item i
join i.bids b
where b.amount > 100


Maybe it should be clarified that the result is list of all items that have at least one bid having amount > 100 but for each that item all bids will be loaded on item.getBids, not just those amount > 100

Message was edited by:
aurelije
I've read several times chapter 15.4 and always had to scratch my head with few misleading and fuzzy sentences.

Example 1:
Chapter15.4.4. Explicit joins, page 393:

For example, the following query and retrieves items that have no bids, and items with bids of a minimum bid amount:
select i, b from Item i
left join i.bids b on b.amount > 100


So we have now 3 types of Item objects:
1) Items without bids
2) Items with bids, where at least one bid is greater then 100
3) Items with bids, where all bids are lower then 100

The sentence "retrieves items that have no bids, and items with bids of a minimum bid amount" could mean that only type 1 and 2 of Items will be fetched, but that is not true, all items will be fetched but just not all Bids as second result in result pair.
almost 2 months later and no update...
I am sorry to hear that there is a financial problem between Manning and you.

I hope that everything will be fine
Hi,

I am reading chapter 2.2.4 and I understand that it is important to have bidirectional association always set on both sides.

You are giving an example of that in listing 2.3 where addBid method in class Item sets association on both sides. But you should give listing of Bid class, where setItem method should also perform setting bidirectional association.

In listing 2.4 Bid constructor is setting connection with Item but opposite connection is not set so Item's collection of bids is not updated.

Maybe the code that will come with the book would make this much clear, but for now those examples are fuzzy.

Keep a good work,
Zlatan Kadragic