Questions tagged [micronaut-data]
210 questions
1
vote
2 answers
Kotlin Micronaut Data with r2dbc fails while using Postgres jsonb type
I am trying to set up Micronaut Data r2dbc with Postgres but it fails with
io.r2dbc.postgresql.ExceptionFactory$PostgresqlBadGrammarException: [42804] column blob is of type jsonb but expression is of type character…

jay
- 43
- 3
1
vote
1 answer
JPA/Hibernate & Micronaut, Uppercased Table Name Not Found
Summary:
Micronaut/JPA/Hibernate is lowercasing the name of my database table and throwing an error on startup saying the table can't be found. The table is there, but it's named in uppercase. How do I configure micronaut/jpa/hibernate to respect…

Alpha Fighter
- 110
- 2
- 9
1
vote
1 answer
How do I use @Query in a Micronaut Data repository to do an aggregation query where the results have more than one column?
I completed this tutorial: https://guides.micronaut.io/latest/micronaut-data-jdbc-repository-gradle-java.html
I then added code to the completed, working tutorial to try to do a custom SQL query for a use case involving reading the data with a GROUP…

Matt Welke
- 1,441
- 1
- 15
- 40
1
vote
1 answer
Get Connection from injected DataSource throws exception with multiple datasources in Micronaut Data JDBC
Couldn't get connection from injected DataSource like spring and as written in documentation(Configuring Multiple Data Sources) https://micronaut-projects.github.io/micronaut-sql/latest/guide/#:~:text=Configuring%20Multiple%20Data%20Sources…

nikli
- 2,281
- 2
- 24
- 38
1
vote
1 answer
Shared microservice, Micronaut error - Multiple possible bean candidates found
I am trying to build a simple API using Micronaut to fetch all users, which works properly on localhost, but facing the below issue with docker image -
Internal Server Error: Error instantiating bean of type …

Ishika Jain
- 949
- 2
- 11
- 23
1
vote
0 answers
Micronaut @PrePersist change ignored
I'd like to set some values on my entities automatically when they're persisted, based on another object from my application context (in my case, the user making the change, fetched from the SecurityContext). Because the data is coming from a global…

Ben Schreiber
- 377
- 2
- 13
1
vote
3 answers
java: Unable to implement Repository method: PersonRepository.save(Object entity). No possible implementations found
I'm making a small endpoint and it doesn't work for me. It is very simple, and for this I am using micronaut
My pom.xml

Eduardo Martinez
- 13
- 4
1
vote
1 answer
Micronaut Data simple parent/children relation
Hi I am trying to start a project with Micronaut Data in Kotlin and I am trying to get a simple table relation going. However I am having trouble using the micronaut annotations.
The parent and child entities are the following:
import…

Michael
- 11
- 1
1
vote
1 answer
How to add a foreign key constraint with the annotations
I have a 2 entities ParentEntity and ChildEntity where the ChildEntity references the ParentEntity. This is a many (child) to one (parent) relationship and is defined as follows:
@MappedEntity
public record ChildEntity (
@Id Long id,
String…

Craig
- 853
- 1
- 10
- 17
1
vote
1 answer
Passing enum as method parameter causes Hibernate exception
I'm writing a Micronaut application which uses Hibernate to access the database. The issue I'm running into occurs when I try to query an entity using an enum value. If I pass an instance of an enum into the repo then everything works fine. But if I…

Archmede
- 1,592
- 2
- 20
- 37
1
vote
0 answers
Ignore 'datasources' for @MicronautTest
I'm trying to test some services in Micronaut which do not need a datasource connection but if there is a datasource configured in the application.yml then running a @MicronautTest connects to the database.
application.yml
# ...
datasources:
…

Archmede
- 1,592
- 2
- 20
- 37
1
vote
1 answer
HttpClient throws null pointer exception in my class which extends MicronautRequestHandler
I am getting NullPointerException for httpClient in the code mentioned below:
@Introspected
public class CustomEventHandler extends MicronautRequestHandler

user3769960
- 91
- 1
- 5
1
vote
1 answer
Micronaut only work with one database even connected with two databases
I have configured a Micronaut application with two MySQL databases but it always performs operations with default datasource.
How can I work with multiple databases?
Here is my application.yml configuration:
datasources:
default:
url:…

umesh
- 155
- 1
- 9
1
vote
0 answers
Micronaut Data: org.hibernate.loader.MultipleBagFetchException
I am ussing micronaut-data framework to a app that store server emails.
I have a entity EMAILDB, that store the email in sql tables.
in this entity i have many to many relations with email address:
@ManyToMany
List…

mls_dev
- 511
- 2
- 6
- 21
1
vote
2 answers
No identifier specified for entity for native-image app
I have entity with field id annotated by @Id:
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import lombok.Data;
import…

TOUDIdel
- 1,322
- 14
- 22