Questions tagged [micronaut-data]
210 questions
3
votes
2 answers
Foreign key of child not added to parent entity when saving, one-to-one
I have the following setup:
Micronaut 3.x
Java 15
Entity I'm trying to update:
@Setter
@Getter
@Entity
@ToString
@Table(name = "single_choice_question")
public class SingleChoiceQuestion extends OrderedQuestion {
@OneToOne(cascade =…

Dariy Pozinenko
- 51
- 5
3
votes
1 answer
Optimistic Locking: unsupported Version type long
I´m trying to use Optimistic Locking with Micronaut Data and Kotlin, but unfortunately it fails with the Exception:
14:33:32.113 [default-nioEventLoopGroup-1-2] ERROR i.m.h.s.netty.RoutingInBoundHandler - Unexpected error occurred: An error occurred…

stk
- 6,311
- 11
- 42
- 58
3
votes
1 answer
No possible implementation found for native micronaut data insert queries
I'm in the process of migrating a spring boot application to micronaut and stumbled upon a problem with micronaut data.
When using native queries which worked in spring boot data I get a compilation error for a query in which I try to insert some…

user51010
- 93
- 1
- 7
3
votes
1 answer
Getting a specific instance of EntityManager incase of multiple datasources in Micronaut
I've the following definition for two different datasources in the application.yml of a Micronaut application -
datasources:
default:
url:
driverClassName: org.postgresql.Driver
username:
password:
…

V.Vidyasagar
- 633
- 6
- 13
3
votes
2 answers
Micronaut, db-scheduler: No current transaction present. Consider declaring @Transactional on the surrounding method
I'm trying to use db-scheduler with Micronaut. Therefore, I created a @Singleton service where I inject the actual DataSource which is of type TransactionAwareDataSource. I then call a certain method to setup the scheduler which is something like:
…

Christian Spiewok
- 31
- 1
3
votes
1 answer
Micronaut data problem lazily fetching related entities
I am currently in the process of incorporating micronaut data into an existing micronaut project (as part of upgrading it) and I am experiencing some problems regarding lazily fetching related collections (with a OneToMany relation).
I have the…

akortex
- 5,067
- 2
- 25
- 57
3
votes
1 answer
Kotlin, Micronaut and Hibernate custom bean validator is never called
I'm studying Micronaut and Kotlin using gRPC for a project at work, and I've ran into some problems that I can't seem to find a answer to.
I'm recriating some personal Spring projects in Micronaut using Kotlin. In those projects I create a custom…

PanzerBerg
- 33
- 5
3
votes
2 answers
Unexpected error occurred: Micronaut Data method is missing compilation time query information
I'm facing this problem with micronaut. I followed the documentation, but it might be something missing because every time I try to access a repository it comes out this erro:
[default-nioEventLoopGroup-1-2] ERROR…

Floriano Victor Peixoto
- 158
- 1
- 8
3
votes
0 answers
Micronaut data with Reactive mongodb + JPA/Hibernate Repository
I am trying to use reactive MongoDb with JPA (RxJavaCrudRepository. Is there any sample reference so that I can follow.
implementation("io.micronaut.mongodb:micronaut-mongo-reactive")
I found this one…

San Jaisy
- 15,327
- 34
- 171
- 290
3
votes
0 answers
Micronaut data Transactional Could not obtain transaction-synchronized Session for current thread
I have to test a pessimistic lock implementation done with Micronaut data and Hibernate. When I am running the JUnit test case,with command gradle test it is giving error
io.micronaut.context.exceptions.BeanInstantiationException: Error…

Sujith C P
- 105
- 1
- 11
3
votes
2 answers
Micronaut Data - No bean of type [org.hibernate.SessionFactory]
First to mention - I had everything up and running. The only change I made was adding some more repositories to the code.
Then I got:
15:47:58.126 [pool-2-thread-4] ERROR
i.m.h.s.netty.RoutingInBoundHandler - Unexpected error occurred:
Failed…

IEE1394
- 1,181
- 13
- 33
3
votes
2 answers
Micronaut unit test - how to set default schema
I tried to use unit test but could not find the way to set the default schema in this sample application.
This is a simple micronaut-data example having model, repository and service. HSQL database is used in application, and Hikari db-pool…

Ankit Wasankar
- 145
- 1
- 12
3
votes
1 answer
Micronaut data issue with Many-to-Many relationship NOT returning nested DTOs
I am new to Micronaut, and I have been following the documentation to set up a simple REST application. I thought I would start with a simple Many-to-Many relationship. Everything seemed to be working. The Database tables are being generated at…

AndyRED
- 331
- 1
- 3
- 15
3
votes
0 answers
Getting "detached entity passed to persist" while trying to update entity
I'm trying to update an object. As part of the process I load the old one from the database and "transfer" its property values to a new object.
But when I try to persist the new object I get the following…

user672009
- 4,379
- 8
- 44
- 77
3
votes
1 answer
calling stored prcocedure micronaut data
Due to legacy reasons, we have a lot of code sitting under stored procedures. Similar to Spring data (@Procedure), is there a way in micronaut to call stored procedures. Do I have to inject entityManager and use CreateNamedStoredProcedureQuery().
…

Ashish Garg
- 101
- 1
- 7