Questions tagged [micronaut-data]
210 questions
1
vote
0 answers
@ManyToMany does not return Micronaut's nested data
I'm new to Micronaut, and have followed the documentation to set up a REST application, but I can't make a simple list from many to many. When starting the application everything looks normal, the database tables are being generated normally, and…

Jessica Santos
- 11
- 2
1
vote
0 answers
How to override save method in jdbc repository with insert sql statement
I'm using Micronaut Data JDBC (not JPA). It works fine with queries, where I can extend the CrudRepositry interface and add the queries as needed. For example:
@JdbcRepository
public interface MyRespository extends CrudRepository…

Fujian Y.
- 11
- 1
1
vote
0 answers
Micronaut DataAccessException: Cannot convert type Consider defining a TypeConverter bean to handle this case
I am trying to run Micronaut data JDBC example using Micronaut version 2.0.1, I am using MySQL database as datasource.
https://github.com/micronaut-projects/micronaut-data/tree/master/examples/example-jdbc-groovy
when I access the…

sfgroups
- 18,151
- 28
- 132
- 204
1
vote
0 answers
JPA/Hibernate call SQL Server Stored procedure with default values for paramerers
I am calling a sql server stored procedure with 10 parameters. The first 2 parameters expects values to be passed, all the others have default values set. I am calling the stored procedure as shown below…

kTest
- 367
- 1
- 11
1
vote
1 answer
Micronaut data pagination full-text search query
I'm using Micronaut Data version 1.0.2.
Given the following JPA entity class:
@Entity
public class Product {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String code;
private String name;
…

limcheekin
- 144
- 1
- 12
1
vote
2 answers
Micronaut Data JDBC and Postgres Arrays
Do you know if Micronaut Data JDBC supports Postgres array using Java array/collections or do I need to define a custom type? If so how? I looked at https://micronaut-projects.github.io/micronaut-data/latest/guide/#jdbcDataTypes but did not see any…

Emmanuel John
- 2,296
- 1
- 23
- 30
1
vote
2 answers
Micronaut multiple JDBC templates not working
I am trying to write a micronaut function which is deploying as AWS Lambda.
With my micronaut function, I need to connect to multiple databases and get the data and put details into AWS SQS. In this regard, I am trying to use JDBC template approach…

Buddha
- 185
- 1
- 15
1
vote
0 answers
Micronaut Data - Error saving ZonedDateTime field [Cannot convert type [class java.time.ZonedDateTime] to target type: class java.util.Date]
Been trying to use Micronaut Data module for db persistence but getting following error when I try to save an entity with ZonedDateTime field.
io.micronaut.data.exceptions.DataAccessException: Cannot convert type [class java.time.ZonedDateTime] to…

metasync
- 338
- 1
- 10
1
vote
1 answer
How to inject a JPA repository for multiple datasources in micronaut-data?
I have a micronaut-data application and for a copy operation I need to use the same JPA repository to access multiple datasources. I would like to inject them into different variable, e.g. sourceRepo and targetRepo. The datasources are declared in…

eso
- 78
- 1
- 9
1
vote
0 answers
Micronaut data, GraalVM, AWS fails on build
I start of by this guide:
https://guides.micronaut.io/micronaut-function-graalvm-aws-lambda-gateway/guide/index.html
Which works and creates an API deployable in a local SAM instance.
In my real project I need access to JPA, database so I add the…

TomRob
- 11
- 3
1
vote
3 answers
Micronaut-Data JDBC - Multiple Dialects for Test and Production
The Mirconaut docs on JDBC repositories clearly tells us we have to create a test repository to test against another dialect. I think this will be manageable (e.g. Postgres for production and H2 for test).
The problem is I have to repeat my…

Mike Houston
- 246
- 2
- 8
1
vote
2 answers
Entity listener not called
I have the following entity and associated listener
@Entity
@EntityListeners(InjuryListener::class)
class Injury(val description: String,
@Id @GeneratedValue(strategy = GenerationType.SEQUENCE) val id: Long = 0)
@Singleton
class…

user672009
- 4,379
- 8
- 44
- 77
1
vote
1 answer
How to use @Transient with Micronaut Data and Kotlin properties that lack a backing field?
I'm moving to Micronaut Data JDBC and Kotlin from Spring Data JDBC and Java, and have trouble with @Transient on a Kotlin property which does not have a backing field.
Example code:
interface Foo {
// @JvmDefault here had no effect on my…

binkley
- 573
- 1
- 6
- 8
1
vote
2 answers
Do you directly pass hibernate / jpa entity-objects via http or is there an better alternative?
first of all I want to state that I'm fairly new to this JPA / Hibernate thing and also micronaut is new for me (I have much experience in for example PHP, Python, "Desktop Java", C++ and so on).
I cannot get rid of the feel that I'm…

kevdev
- 13
- 2
1
vote
1 answer
MicronautTest Datasource setup not clean before each execution
I have this micronaut application doing some basic database lookup, just for testing the framework. I have setup the application with flyway database migrations, running a h2 database in my test setup (production uses postgresql). This is used for…

Runar Halse
- 3,528
- 10
- 39
- 59