[JAVA-2767] Change the data-model in quickstart to use storeId instead of id

Description

<p>Imported from JAVA-2767, originally reported by tomekl007 on Mon, 11 May 2020 14:03:25 GMT.</p>
<hr />
<p>We should adapt documentation to this change as well.</p>
<p>See this conversation for more details:<br> https://github.com/datastax/cassandra-quarkus/pull/9#discussion_r422950419</p>

Issue is synchronized with a GitHub issue by Unito
Repository Name: cassandra-quarkus
Issue Number: 31
Milestone: 1.0.0-alpha1

Environment

None

Pull Requests

None

Activity

Show:

Karan Dhingra 
July 22, 2021 at 12:19 AM

Alexandre Dutra commented:

<p>Imported from <a href="https://datastax-oss.atlassian.net/browse/JAVA-2767?focusedCommentId=52630">JAVA-2767</a>, originally commented by tomekl007 on Wed, 20 May 2020 06:15:08 GMT.</p>
<hr />
<p>I picked the Fruit data model because from what I see it is used by data access quarkus extensions, i.e:<br> dynamo, hibernate, Mongo, neo4j, spring-data, vertx</p>

Karan Dhingra 
July 22, 2021 at 12:19 AM

Alexandre Dutra commented:

<p>Imported from <a href="https://datastax-oss.atlassian.net/browse/JAVA-2767?focusedCommentId=52615">JAVA-2767</a>, originally commented by adutra on Tue, 19 May 2020 15:45:38 GMT.</p>
<hr />
<p>clun suggests that we use the stock prices model that advocates usually pick for their reactive demos:</p>

<pre>CREATE TABLE stock_prices (symbol text, date timestamp, price decimal,
PARTITION KEY (text, date));</pre>

<pre>Entity
<span>class </span>StockPrice {
PartitionKey <span>private</span> <span>final</span> <span>String</span> symbol;
ClusteringColumn <span>private</span> <span>final</span> Instant date;
<span>private</span> <span>final</span> BigDecimal price;
...
}</pre>

Karan Dhingra 
July 22, 2021 at 12:19 AM

Alexandre Dutra commented:

<p>Imported from <a href="https://datastax-oss.atlassian.net/browse/JAVA-2767?focusedCommentId=52589">JAVA-2767</a>, originally commented by adutra on Fri, 15 May 2020 16:40:03 GMT.</p>
<hr />
<p>When changing the data model in quickstart, the documentation in documentation/src/main/asciidoc/cassandraclient.adoc needs to be changed accordingly.</p>

Karan Dhingra 
July 22, 2021 at 12:19 AM

Alexandre Dutra commented:

<p>Imported from <a href="https://datastax-oss.atlassian.net/browse/JAVA-2767?focusedCommentId=52570">JAVA-2767</a>, originally commented by olim7t on Tue, 12 May 2020 16:29:26 GMT.</p>
<hr />
<p>Somewhat related:</p>
<ul>
<li>the Fruit fields are out of order: first a clustering column, then a regular column, then a partition key column. I know technically it doesn't matter, but it bothers me.</li>
<li>typo in FruitResource: covertFromDto</li>
</ul>

Fixed

Details

Assignee

Reporter

Due date

Priority

Created July 22, 2021 at 12:19 AM
Updated July 22, 2021 at 3:17 AM
Resolved July 22, 2021 at 12:19 AM