Skip to content
Advertisement

Tag: hibernate

Using the concept of JPA, how to update table using data from another table?

FmoReorgGeo.java FMOReorgGeoServiceImpl.java FMOReorgGeoRepository.java ERROR LOG *I am trying to fetch data from reorgViewX and then updating FmoReorgGeo table. I am being able to fetch data correctly but when running update query I am getting error. The error says: Could not extract result set metadata; nested exception is org.hibernate.HibernateException: Could not extract result set metadata. I am using the concept of

Connecting 3 tables with hibernate / spring-boot

I have problem understanding how to connect 3 tables with spring-boot / hibernate. Tables are: Users, Technologies, Categories Every user has all of the 10 categories but inside this categories they can save one or more technologies. Each technology can be listed in several different categories. I have a code that works partially as for now instead referencing the table

auto changing data with Hibernate

I have problem with Hibernate. I have next method: This method should assign user on task and send message to kafka consumer with TaskBeforeUpdate and TaskAfterUpdate. But I have problem when I try to assign user, my BeforeUpdateTask change all his fields to TaskAfterUpdate. And this dont work, but i dont know why he is change all values. Answer The

Column ‘foreign_key_id’ cannot be null

I have a rest api exposed via @RepositoryRestResource from spring-data-rest-api. When I try to give the json payload from Postman to create a User linked to an Organization, it complains that Column ‘organizationId’ cannot be null, when I clearly provided it in the json. Each user belongs to an organization, so it’s a many to one relationship. I want Java

Does Hibernate allow writing of String/Type Safe SQL?

Does Hibernate allow the writing of String/Type SQL , similar to Entity Framework /w Linq, where a person can write proper Sql, and any misspelled SQL Table, Column names will be shown at compile time instead of run execution time? Answer As requested I’m adding my comment as an answer. Id depends on how you are creating your query, If

Advertisement