Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panache docs should have a full REST resource before the advance query section #10927

Closed
joewhite101 opened this issue Jul 23, 2020 · 6 comments · Fixed by #18071
Closed

Panache docs should have a full REST resource before the advance query section #10927

joewhite101 opened this issue Jul 23, 2020 · 6 comments · Fixed by #18071
Assignees
Labels
Milestone

Comments

@joewhite101
Copy link
Contributor

Describe the bug

In reviewing the getting started docs for panache at (https://quarkus.io/guides/hibernate-orm-panache) there are a couple of common errors that users might make and some opportunities to reorder some of the sections for simpler getting started and new users.

H2 in mem url for simple getting started

The one thing that I would think about adding for getting started is a reference to a pure in memory h2 configuration so that somebody could get booted up in memory without having to leave the page. I had to google the jdbc url for h2 in memory jdbc:h2:mem:testdb

Rest Resource example

we need to add an example for a REST resource before the advance query section.to provide full examples prior to the advance query section. Discussed with @loicmathieu in Zulip and we decided to open this ticket to track some potential updates.

Transactional Context

There was also some discussion around updating or linking to some additional context on when an @Transactional annotation is required. This is all covered in the docs already but may be worth additional info.

From the chat:

@transactional is required on methods modifying the database ,or to keep open a database resultset after the scope of the entity/repository method call (which is needed for the stream() methods of the entity/repository).
There is an implicit transaction for read operations so normally it should not be required to add @transactional to your getAlerts() method.
I remember having a some discussion with Sanne (one of our Hibernate expert) about this, he advise to always use a transaction. If you have a service layer, you can add @transactional at the class level.
By the way, the Panache guide describe some transaction usage: https://quarkus.io/guides/hibernate-orm-panache#transactions

Expected behavior
We need to add an example for a REST resource before the advance query section.

Actual behavior
See docs

To Reproduce
N/A

Configuration
N/A - Docs

Screenshots
NA

Environment (please complete the following information):

  • Output of uname -a or ver:
    Darwin Josephs-MBP.homenet.telecomitalia.it 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64

  • Output of java -version:

openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
  • GraalVM version (if different from Java):

  • Quarkus version or git rev:
    latest docs at

  • Build tool (ie. output of mvnw --version or gradlew --version):

Additional context
(Add any other context about the problem here.)

@joewhite101 joewhite101 added the kind/bug Something isn't working label Jul 23, 2020
@quarkusbot
Copy link

/cc @FroMage, @loicmathieu

@loicmathieu loicmathieu added the good first issue Good for newcomers label Dec 21, 2020
@imshuv
Copy link

imshuv commented Jan 20, 2021

I want to work on this ,I would be extremely thankful if someone could guide me on how to get started with this?

@loicmathieu
Copy link
Contributor

@imshuv if you're new to contributing to Quarkus, you can read the Contributing for the first time blog post.
This issue is to add a REST example to the Panache guides (Hibernate, MongoDB, Hibernate Reactive and the Kotlin variants).
You can take as example other guides.
The REST example can comes from the quickstarts.

@Anushka-shukla
Copy link

Hi @loicmathieu If someone is not working on this issue can you please assign this to me. Many thanks!

@loicmathieu
Copy link
Contributor

@imshuv you ask for advise on this one two weeks ago, do you plan to work on it ? Otherwise I'll assign it to @Anushka-shukla thats also volonteer for it.

@imshuv
Copy link

imshuv commented Feb 4, 2021

I wanted to work on it but being a beginner I'm not able to understand a lot of things.

@loicmathieu loicmathieu self-assigned this Jun 22, 2021
loicmathieu added a commit to loicmathieu/quarkus that referenced this issue Jun 22, 2021
loicmathieu added a commit to loicmathieu/quarkus that referenced this issue Jun 22, 2021
@quarkus-bot quarkus-bot bot added this to the 2.1 - main milestone Jun 22, 2021
@gsmet gsmet modified the milestones: 2.1 - main, 2.0.0.Final Jun 22, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jun 22, 2021
patrox pushed a commit to patrox/quarkus that referenced this issue Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants