habuma / spring-in-action-6-samples

Sample code from Spring in Action 6
486 stars 342 forks source link

chapter 4 Cassandra DB: no data stored in table tacos #19

Open lilyhe123 opened 1 year ago

lilyhe123 commented 1 year ago

After submitting an order via UI, I checked data in Cassandra via cqlsh. Taco information is stored in table orders in json but no data stored in table tacos. It's different from what described in the book.

cqlsh:taco_cloud> select id, tacos from orders;

 id                                   | tacos
--------------------------------------+-------------------------------------------------------------------------------------------------------------------
 2f09eca0-6468-11ee-b2c3-5d2ec40b06dd | [{ingredients: [{name: 'Corn Tortilla', type: 'WRAP'}, {name: 'Cheddar', type: 'CHEESE'}], name: 'lily''s taco'}]

(1 rows)

cqlsh:taco_cloud> select * from tacos;

 id | createdat | ingredients | name
----+-----------+-------------+------

(0 rows)
lilyhe123 commented 1 year ago

PR https://github.com/habuma/spring-in-action-6-samples/pull/20 suppose to fix this.