Questions tagged [mappedby]
23 questions
0
votes
0 answers
Grails v3.3.9 GORM defect - one to many with mappedBy, updates can be made to fail
Grails v3.3.9 - impacts live/dev and integration test
My scenario is that I had an integration test that kept failing when building a manually created record and one found from DB, but works if you link two manually created records in the test.
I…

WILLIAM WOODMAN
- 1,185
- 5
- 19
- 36
0
votes
1 answer
how to avoid dirty checking in hibernate
I have a entity call Company, and another entity call token.
1 Company will have many tokens.
So in my Company entity, I will have something like follow:
@OneToMany(mappedBy = "companyId")
public Set< Token > getTokens() {
return tokens;
…

Panadol Chong
- 1,793
- 13
- 54
- 119
0
votes
1 answer
Hibernate user messages relation
How to create next type of relation in Hibernate entity classes?
User sends message to another user by creating message (sender, receiver, message). DB looks like this:
+-----------------------------------+
| user …

Vadym Borys
- 115
- 2
- 11
0
votes
0 answers
use of mappedBy and query in jpa
Hi I have a relation like this in BookEO and BookAreaEO classes respectively. Now, I wanted to understand what is the purpose of mappedBy and how I can write a query like below in BookEO using JPA
select * from book b where exists (
select…

user3310115
- 1,372
- 2
- 18
- 48
0
votes
1 answer
ManyToOne and OneToMany
I use Hibernate and I have entities:
@Data
@Entity
public class Country {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private long id;
@Column(name = "country_nm")
private String…

ru51an
- 113
- 1
- 1
- 10
0
votes
2 answers
How to use mappedBy with more than one value JPA
I have 2 tables:
Currency and Rate
The currency's primary key is referenced by the inputCurrency and outputCurrency foreigh keys in the Rate.
How can I map these in order to cascadeALL?
I tried in Rate (the table that contains the foreigh…

Nelly Junior
- 556
- 2
- 10
- 30
0
votes
0 answers
Simple OneToMany Cascade (all) doesn't work ;mappedBy , org.apache.openjpa.persistence.ArgumentException
I have two classes, ForfaitGenerique and Offre .
In the class ForfaitGenerique, the "mappedBy" doesn't recognize "forfaitgenerique" ; I am getting this error :
The bean encountered a non-application exception; nested exception is:…

Bénédicte Lagouge
- 482
- 2
- 9
- 24
-2
votes
1 answer
"mappedBy reference an unknown target entity property" Hibernate, ManyToMany
I tried to make a DB for my program using Maven framework. However, I got this kind of error.
Invocation of init method failed; nested exception is org.hibernate.AnnotationException: mappedBy reference an unknown target entity property:…

Gagak
- 129
- 2
- 13