How to see what fields are available in Axon databases?How do I start using CQRS with Axon framework on an existing databaseBatch entity creation in axonHow to get all aggregates with Axon framework?How can I get a list of eventprocessor in axon 3.1.1How to use axon with spring cloud in a micro services systemHow to consume different commands in different microservices using Axon?Axon: JUnit Test. How to change the creation time of given events by testFixture?How to event source entire datastore with axon?How do I configure Event Processors in Axon with Spring?Axon @QueryHandler with Spring @ExceptionHandler

Does Ubuntu reduce battery life?

What is my clock telling me to do?

How to innovate in OR

UX writing: When to use "we"?

PCB design using code instead of clicking a mouse?

Author attribution in open-source licenses?

Why do we need a voltage divider when we get the same voltage at the output as the input?

Coworker mumbles to herself when working, how to ask her to stop?

Avoiding Implicit Conversion in Constructor. Explicit keyword doesn't help here

What does 「ちんちんかいかい」 mean?

Why would an invisible personal shield be necessary?

Can there ever be any problem when using gedit to edit system files with 'sudo -H gedit'?

What would the United Kingdom's "optimal" Brexit deal look like?

Why does the Rust compiler not optimize code assuming that two mutable references cannot alias?

"Valet parking " or "parking valet"

Is it unprofessional to mention your cover letter and resume are best viewed in Chrome?

Best Ergonomic Design for a handheld ranged weapon

How char is processed in math mode?

Can I send/receive payments but prevent forwarding payments in Lightning Network?

Introduction to the Sicilian

Move arrows along a contour

How can I type the name of the person I'm calling on the dial pad and make the call?

Can machine learning learn a function like finding maximum from a list?

May a hotel provide accommodation for fewer people than booked?



How to see what fields are available in Axon databases?


How do I start using CQRS with Axon framework on an existing databaseBatch entity creation in axonHow to get all aggregates with Axon framework?How can I get a list of eventprocessor in axon 3.1.1How to use axon with spring cloud in a micro services systemHow to consume different commands in different microservices using Axon?Axon: JUnit Test. How to change the creation time of given events by testFixture?How to event source entire datastore with axon?How do I configure Event Processors in Axon with Spring?Axon @QueryHandler with Spring @ExceptionHandler






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















Completely new to Axon here.



I have a class defined in Kotlin:



data class ProjectedQuote(
@Id var submissionId: String,
var periodId: String,
var accountNumber: String
)


It gets instantiated and updated by event handlers, then it is returned in response to queries.



I'm needing to create a query that finds a ProjectedQuote instance by accountNumber, not id. I'm not sure how to do that.



To date, I've only done queries like:



SELECT q FROM ProjectedQuote q WHERE q.id LIKE CONCAT(:idStartsWith, '%') ORDER BY q.id


My narrowly-focused question is:



How do I write a query that finds ProjectedQuote using accountNumber instead of id?



My broader question is:



How can I see what fields are available to query by in the Axon databases?










share|improve this question






























    0















    Completely new to Axon here.



    I have a class defined in Kotlin:



    data class ProjectedQuote(
    @Id var submissionId: String,
    var periodId: String,
    var accountNumber: String
    )


    It gets instantiated and updated by event handlers, then it is returned in response to queries.



    I'm needing to create a query that finds a ProjectedQuote instance by accountNumber, not id. I'm not sure how to do that.



    To date, I've only done queries like:



    SELECT q FROM ProjectedQuote q WHERE q.id LIKE CONCAT(:idStartsWith, '%') ORDER BY q.id


    My narrowly-focused question is:



    How do I write a query that finds ProjectedQuote using accountNumber instead of id?



    My broader question is:



    How can I see what fields are available to query by in the Axon databases?










    share|improve this question


























      0












      0








      0








      Completely new to Axon here.



      I have a class defined in Kotlin:



      data class ProjectedQuote(
      @Id var submissionId: String,
      var periodId: String,
      var accountNumber: String
      )


      It gets instantiated and updated by event handlers, then it is returned in response to queries.



      I'm needing to create a query that finds a ProjectedQuote instance by accountNumber, not id. I'm not sure how to do that.



      To date, I've only done queries like:



      SELECT q FROM ProjectedQuote q WHERE q.id LIKE CONCAT(:idStartsWith, '%') ORDER BY q.id


      My narrowly-focused question is:



      How do I write a query that finds ProjectedQuote using accountNumber instead of id?



      My broader question is:



      How can I see what fields are available to query by in the Axon databases?










      share|improve this question














      Completely new to Axon here.



      I have a class defined in Kotlin:



      data class ProjectedQuote(
      @Id var submissionId: String,
      var periodId: String,
      var accountNumber: String
      )


      It gets instantiated and updated by event handlers, then it is returned in response to queries.



      I'm needing to create a query that finds a ProjectedQuote instance by accountNumber, not id. I'm not sure how to do that.



      To date, I've only done queries like:



      SELECT q FROM ProjectedQuote q WHERE q.id LIKE CONCAT(:idStartsWith, '%') ORDER BY q.id


      My narrowly-focused question is:



      How do I write a query that finds ProjectedQuote using accountNumber instead of id?



      My broader question is:



      How can I see what fields are available to query by in the Axon databases?







      axon






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 26 at 22:11









      Jonathan MJonathan M

      14k6 gold badges40 silver badges76 bronze badges




      14k6 gold badges40 silver badges76 bronze badges

























          2 Answers
          2






          active

          oldest

          votes


















          1














          Query messages typically read data from the view models created by the event listeners. Event listeners typically execute logic based on decisions that have been made by the command model. Usually, this involves updating view models or forwarding updates to other components.



          So the mechanism for creating and receiving views is entirely up to you. (jpa, spring data, mybatis, jdbc etc.) A good example the axon project is https://github.com/idugalic/digital-restaurant






          share|improve this answer
































            1














            What Sergey points out here too is very valid.
            How you model your Query Model in such an application is entirely up to you. So pick JPA, JDBC, MongoDB, ElasticSearch, Neo4j..whichever format of containing the Query Model suites you best!



            This freedom of storage mechanisms thus also points out that your Query Model isn't stored in an 'Axon Database'; it's stored in the database you have chosen.



            In regards to how to model your queries, you could have a look at how QueryMessages and QueryHandlers can be used in Axon, over here. This is just another dedicated type of message from Axon's perspective, just like Command- and EventMessages.



            Using Query Messages, you can specify the type of query you'd want to perform as a separate object, which is the query.
            This query will in turn be handled by an @QueryHandler annotated function.
            The @QueryHandler annotated function will in turn perform the actual operation to retrieving the model from the database you have chosen to use to store the model in.



            Hope this gives you some insights!






            share|improve this answer



























              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55366928%2fhow-to-see-what-fields-are-available-in-axon-databases%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1














              Query messages typically read data from the view models created by the event listeners. Event listeners typically execute logic based on decisions that have been made by the command model. Usually, this involves updating view models or forwarding updates to other components.



              So the mechanism for creating and receiving views is entirely up to you. (jpa, spring data, mybatis, jdbc etc.) A good example the axon project is https://github.com/idugalic/digital-restaurant






              share|improve this answer





























                1














                Query messages typically read data from the view models created by the event listeners. Event listeners typically execute logic based on decisions that have been made by the command model. Usually, this involves updating view models or forwarding updates to other components.



                So the mechanism for creating and receiving views is entirely up to you. (jpa, spring data, mybatis, jdbc etc.) A good example the axon project is https://github.com/idugalic/digital-restaurant






                share|improve this answer



























                  1












                  1








                  1







                  Query messages typically read data from the view models created by the event listeners. Event listeners typically execute logic based on decisions that have been made by the command model. Usually, this involves updating view models or forwarding updates to other components.



                  So the mechanism for creating and receiving views is entirely up to you. (jpa, spring data, mybatis, jdbc etc.) A good example the axon project is https://github.com/idugalic/digital-restaurant






                  share|improve this answer













                  Query messages typically read data from the view models created by the event listeners. Event listeners typically execute logic based on decisions that have been made by the command model. Usually, this involves updating view models or forwarding updates to other components.



                  So the mechanism for creating and receiving views is entirely up to you. (jpa, spring data, mybatis, jdbc etc.) A good example the axon project is https://github.com/idugalic/digital-restaurant







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 27 at 7:12









                  Sergey BulavkinSergey Bulavkin

                  1,5021 gold badge9 silver badges21 bronze badges




                  1,5021 gold badge9 silver badges21 bronze badges


























                      1














                      What Sergey points out here too is very valid.
                      How you model your Query Model in such an application is entirely up to you. So pick JPA, JDBC, MongoDB, ElasticSearch, Neo4j..whichever format of containing the Query Model suites you best!



                      This freedom of storage mechanisms thus also points out that your Query Model isn't stored in an 'Axon Database'; it's stored in the database you have chosen.



                      In regards to how to model your queries, you could have a look at how QueryMessages and QueryHandlers can be used in Axon, over here. This is just another dedicated type of message from Axon's perspective, just like Command- and EventMessages.



                      Using Query Messages, you can specify the type of query you'd want to perform as a separate object, which is the query.
                      This query will in turn be handled by an @QueryHandler annotated function.
                      The @QueryHandler annotated function will in turn perform the actual operation to retrieving the model from the database you have chosen to use to store the model in.



                      Hope this gives you some insights!






                      share|improve this answer





























                        1














                        What Sergey points out here too is very valid.
                        How you model your Query Model in such an application is entirely up to you. So pick JPA, JDBC, MongoDB, ElasticSearch, Neo4j..whichever format of containing the Query Model suites you best!



                        This freedom of storage mechanisms thus also points out that your Query Model isn't stored in an 'Axon Database'; it's stored in the database you have chosen.



                        In regards to how to model your queries, you could have a look at how QueryMessages and QueryHandlers can be used in Axon, over here. This is just another dedicated type of message from Axon's perspective, just like Command- and EventMessages.



                        Using Query Messages, you can specify the type of query you'd want to perform as a separate object, which is the query.
                        This query will in turn be handled by an @QueryHandler annotated function.
                        The @QueryHandler annotated function will in turn perform the actual operation to retrieving the model from the database you have chosen to use to store the model in.



                        Hope this gives you some insights!






                        share|improve this answer



























                          1












                          1








                          1







                          What Sergey points out here too is very valid.
                          How you model your Query Model in such an application is entirely up to you. So pick JPA, JDBC, MongoDB, ElasticSearch, Neo4j..whichever format of containing the Query Model suites you best!



                          This freedom of storage mechanisms thus also points out that your Query Model isn't stored in an 'Axon Database'; it's stored in the database you have chosen.



                          In regards to how to model your queries, you could have a look at how QueryMessages and QueryHandlers can be used in Axon, over here. This is just another dedicated type of message from Axon's perspective, just like Command- and EventMessages.



                          Using Query Messages, you can specify the type of query you'd want to perform as a separate object, which is the query.
                          This query will in turn be handled by an @QueryHandler annotated function.
                          The @QueryHandler annotated function will in turn perform the actual operation to retrieving the model from the database you have chosen to use to store the model in.



                          Hope this gives you some insights!






                          share|improve this answer













                          What Sergey points out here too is very valid.
                          How you model your Query Model in such an application is entirely up to you. So pick JPA, JDBC, MongoDB, ElasticSearch, Neo4j..whichever format of containing the Query Model suites you best!



                          This freedom of storage mechanisms thus also points out that your Query Model isn't stored in an 'Axon Database'; it's stored in the database you have chosen.



                          In regards to how to model your queries, you could have a look at how QueryMessages and QueryHandlers can be used in Axon, over here. This is just another dedicated type of message from Axon's perspective, just like Command- and EventMessages.



                          Using Query Messages, you can specify the type of query you'd want to perform as a separate object, which is the query.
                          This query will in turn be handled by an @QueryHandler annotated function.
                          The @QueryHandler annotated function will in turn perform the actual operation to retrieving the model from the database you have chosen to use to store the model in.



                          Hope this gives you some insights!







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Mar 27 at 9:26









                          StevenSteven

                          1,9649 silver badges12 bronze badges




                          1,9649 silver badges12 bronze badges






























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid …


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55366928%2fhow-to-see-what-fields-are-available-in-axon-databases%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

                              155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

                              Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?