Questions tagged [mapkeyjoincolumn]

9 questions
1
vote
2 answers

Hibernate: cascade create object from Map field (Map.key)

I have in Class a field Map type. How can I save Object's from Map when parent Class object save? I understand whats the problem, but cant solve it. I cant place annotation @***ToMany to indicate cascade = ALL, talk targets the type…
1
vote
2 answers

Entity Framework Code First : flatten composition in entity with different join column

I have an issue working with EntityFramework using Code First configuration. I have two tables : +---------------+ +-------------+ | T_CONTRACTS | | T_PERSONS | |---------------| |-------------| |CONTRACT_ID | …
1
vote
0 answers

Mapping collection with @MapKeyJoinColumn which key participate in value's composite key

I basically have the following mapping @Entity public class Scheme { @Id private Long id; private String name; } @Embeddable class MetricId { private Long composition; @Column(name = "ID_SCHEME") private Long scheme; } @Entity public…
Baena
  • 23
  • 4
1
vote
0 answers

Map a triple join table with @MapKeyJoinColumn

I have 3 entities named : "Movie", "Person" and "Role", a person has a certain role in a movie. In my database, i have these 3 entities and to link them, a table : Cast(id_movie,id_person,id_role) all primary, because a person can be for example…
MaximeStor
  • 11
  • 2
0
votes
0 answers

HttpMediaTypeNotSupportedException error when doing a post request using @MapKeyJoinColumn in a @JoinTable

Good day I am trying to create a new instance of a class by sending a post request from Postman to a Spring webservice. For some obscure reason I get a "HttpMediaTypeNotSupportedException: Content-Type 'application/json;charset=UTF-8' is not…
Chrissto
  • 1
  • 1
0
votes
1 answer

jpa @OneToMany Map seems impossible

DB tables (not quite SQL but you get the gist..) definition ( id int, -- PK type int, label varchar(20) -- definition label can change over time ) asset ( id int, -- PK -- other asset fields... ) property ( id int, -- PK asset_id…
user2023577
  • 1,752
  • 1
  • 12
  • 23
0
votes
1 answer

How do I reverse key value map types on one side of @ManyToMany JPA relationship

I need advice regarding a many-to-many relationship between KeyStoreEntity and it's 3 child entities (KeyPairEntity, SecretKeyEntity, CertificateEntity). I will use CertificateEntity for this example as other 2 follow the same pattern/issue. My…
Mike Klein
  • 11
  • 1
  • 4
0
votes
0 answers

Hashmap with 2 Foreign Keys

How to create a hashmap with 2 foreign keys as reference? Something like, Table 3 have a hashmap that for each table1 id have an id from table2. @Entity public class table1 implements Serializable { private static final long serialVersionUID =…
Xplouder
  • 148
  • 1
  • 4
  • 13
-1
votes
1 answer

Typescript mapKey and pick

I want to convert the following js code in ts, without using loadish.js. let claimNames = _.filter(_.keys(decodedToken), o => o.startsWith(ns) ); let claims = ( _.mapKeys(_.pick(decodedToken, claimNames), (value, key) => …