You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm writing a REST API in quarkus and today I've noticed that all the update methods stop working. As mentioned in the issue title I'm using the repository pattern (personal choise).
Basically, performing a PUT or PATCH request does not save the changes into the database no matter if the action is marked as Transactional.
To Reproduce
Steps to reproduce the behavior:
@EntitypublicclassDepartment {
@Id@GeneratedValuepublicLongid;
@NotBlank(message = "Department name is required")
@Column(nullable = false)
publicStringname;
}
@ealcantara22 if your entity didn't extends PanacheEntity or PanacheEntityBase it must be a valid JPA entity with it's getters and setters. If you don't want to write those getters and setters you can have your entity extends PanacheEntity or PanacheEntitybase even if you are using the repository pattern.
More info in the guide: https://quarkus.io/guides/hibernate-orm-panache#solution-2-using-the-repository-pattern
Describe the bug
I'm writing a REST API in quarkus and today I've noticed that all the update methods stop working. As mentioned in the issue title I'm using the repository pattern (personal choise).
Basically, performing a
PUT
orPATCH
request does not save the changes into the database no matter if the action is marked asTransactional
.To Reproduce
Steps to reproduce the behavior:
Configuration
Environment (please complete the following information):
uname -a
orver
: Linux OP790 5.4.0-42-generic Add proper logging #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linuxjava -version
: openjdk 11.0.8 2020-07-14Additional context
I adjusted the logic above to use the
active record pattern
and it worked without problems.Thanks for the great work!! 👍🏼
The text was updated successfully, but these errors were encountered: