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.

vgendler (10) [Avatar] Offline
Hi Chris,

The same place - Chapter 3,
The same method - PlaceOrderServiceResult updateDeliveryInfo(String pendingOrderID, Address deliveryAddress, Date deliveryTime).

May be I missed something but I could not find the moment where the PendingOrder was created and the pendingOrderID was generated and how.

Could you, please, explain this.

Thank you!
ceracm (113) [Avatar] Online
Re: Where is the PendingOrder created and how is the pendingOrderID is gene
The PendingOrder is created by PendingOrderRepository.findOrCreatePendingOrder(). See listing 3.3 on page 83.

The pending order id is the primary key of the PendingOrder and is generated by the object/relational mapping framework (e.g. Hibernate) when a newly created PendingOrder is saved by calling Hibernate

I hope this helps.