Open haibin opened 4 years ago
good question! there should only ever be one Product
for a given sku tho. We're not storing each version as a separate row, just incrementing the version number within a given row...
will see if i can clarify that somehow. incidentally, for issues relating to the book rather than the code, maybe put them in this repo? https://github.com/cosmicpython/book
thanks very much for sending in your questions, we really, really appreciate them. it's nice to know someone is paying attention!
I see the below code for chapter 6. I'm wondering why we do
.first()
. Shouldn't we sort by version_number and get the latest Product?