I'm trying to access a stored function from an oracle database package and fetch the complex return type.
Here are the required code snippets
function get_service_params_by_mac (p_mac_address in varchar2)
return…
With Spring Data JPA, I could use H2 for unit tests and postgres(or any other relational DB) for prod. Here, I need not worry about compatibility issues with queries as its abstracted by JPA.
Can I use the same combination of DBs with Spring Data…
I followed that tutorial to implement multitenancy on my spring application and everything works fine.
When I tried to replace pure jdbcTemplate with spring-data-jdbc to use crudRepositories i have this error:
java.lang.IllegalStateException: Cannot…
Currently I use the following code for a custom SQL statement in a Spring Data JDBC Repository interface:
default void upsert(LoanRecord r) {
upsert(r.getId(), r.getUcdpDocumentFileId(), r.getFreSellerNo(),
…
In my application accessing the database is slow compared to other code, as it has to go over the network.
By my understanding, when wrapping a single database statement in @Transactional in Spring, it does 3 calls to the database. First it sets…
I am using two entities, Employee and Address, where Employee has the controller to do CRUD operations. So for both the entities I am using lifecycle events where Employee events are working fine but not the Address events. So I am trying to save…
I have defined the following custom database query.
@Query("select po.* from purchase_order po where po.purchase_order_number = :purchaseOrderNumber")
List findByPurchaseOrderNumber(String purchaseOrderNumber);
This query always…
Its quite easy to use spring data jdbc dealing with CUD actions for entities with many-to-one refs, but the R(eading) is not so straightforward. Although i could use AggregateReference for querying data with ids only, but frontend asks for full data…
Is the support for Querydsl remove in Spring Data Jdbc 3.0.0-M6? I am now getting an error ‘JdbcRepositoryFactory does not support Quersdsl’ after i upgraded from Spring Boot 3.0.0-M4 to 3.0.0-M5.
In Spring Data JDBC, How I can write in CrudRepository a query with "like", I have try with this one, but it throws an error
@Query("select * from people p where name like :startOfName%")
org.springframework.jdbc.UncategorizedSQLException:…
I was playing with Spring-Data-JDBC and encountered 2 issues. I have following entities with 1:N relationship.
------
DROP TABLE IF EXISTS product;
CREATE TABLE product (
product_id int AUTO_INCREMENT PRIMARY KEY,
name varchar(250) not…
This is my current repo structure, I'm looking for a solution that works with both Postgres and OracleDB and preferably does not involve changing my DB schema to accomodate the ORM. Whether Postgres or Oracle is used is in defined in the…
I have a Kotlin Spring Boot application (com.myapp.webapp.Application) which uses a Repository bean defined in an external library (com.myapp.engine.MyRepository). Such repository is not a JpaRepository because I want to avoid JPA in this stage of…
I'm considering using spring-data-jdbc for a project.
But i don't have any control over the DB-schema.
My domain model can be populated by the existing tables, but they differ in many ways.
Examples:
A specific aggregate in my model consists of…
Suppose I have a table with three columns: id, name, state. The state column is of type jsonb and the structure would always have (as a minimum) a key called active e.g.
{"name": "some_name", active: true, ...}
{"name": "one_two", active: false,…