Linked Questions
8
votes
2
answers
17k
views
Hibernate Cascade PERSIST
I have a general question about Hibernate that I'm batteling with.
I have class A and class B, where B is dependent on A
In my code when I call em.persist(objOfTypeA) I would expect the insert to go ...
7
votes
1
answer
21k
views
JPA @Id and insertable = false, updatable = false throws exception
I'm using Oracle database and I have sequence and trigger for generating and storing ID before insert.
CREATE SEQUENCE CASE_SEQ START WITH 1001 INCREMENT BY 1 NOMAXVALUE;
CREATE OR REPLACE TRIGGER ...
1
vote
1
answer
4k
views
Getting a hibernate error in XML mapping: Repeated column in mapping for entity?
I know there are several similar questions on the list, but I've been unsuccessful in twisting them into a solution for my particular problem.
I am using XML mapping files for my hibernate3 ...
6
votes
1
answer
2k
views
Using a JoinColumn Twice for CompositeKey getting Repeated Column Exception
I have the following situation:
I´m trying to build an application which is multi-tenant with the same tenants in one database
with the same tables. As by know Hibernate is not supporting this ...
0
votes
1
answer
2k
views
I don't understand why Hibernate is creating 2 sessions?
I've been scratching my head for a while and thought I'd get some help :)
I'm working with a legacy database which I cannot change. I have the following domain:
@Entity
public class Institution {
...
2
votes
2
answers
741
views
Foreign key value is inserting value as null in OneToMany mapping
Hello Stackoverflow, I had hard time with OneToMany mapping I have googled to find the solution from morning nothing helped.
I am trying to do @OneToMany mapping relationship.
following are the ...
0
votes
1
answer
1k
views
hibernate error: java.sql.BatchUpdateException: ORA-00932: inconsistent datatypes: expected NUMBER got BINARY
I am trying to insert a row into a table called Mstrauthorizations. When doing so, I get an error saying Could not execute JDBC batch update. The row is not in the DB - so - I do not see how it could ...
0
votes
1
answer
731
views
Hibernate @OneToMany relation with composite keys in Spring Boot
I am trying to build a structure as shown below:
User:
id | username |
------------------
1 | Mary |
2 | George |
3 | Candy |
Movie:
id | name |
------------...
1
vote
1
answer
323
views
JPA: duplicate simple vs. relationship mappings - where to put insertable = false, updatable = false and why
This is a followup question to Hibernate: Where do insertable = false, updatable = false belong in composite primary key constellations involving foreign keys?:
Consider the following entity mapping:
...
1
vote
3
answers
311
views
How to persist entity with joining?
I am confused about how to save entry in db with column's join. I have @Entity bellow
@XmlRootElement
@XmlAccessorType(value = XmlAccessType.FIELD)
@Entity
@Table(name = "psc_users")
@...