Questions tagged [joincolumn]
82 questions
0
votes
0 answers
Join using an intermediary table in JPA (Need to order the final result by a column of intermediary table)
I am able to do a jointable using an intermediate table like below code:
Here is the keywords for a story
In Story.java
@ManyToMany(targetEntity=Keyword.class,
cascade={CascadeType.ALL, CascadeType.MERGE},
fetch =…

Vivek
- 137
- 2
- 17
0
votes
1 answer
CakePHP, How to getting value from another table
I have 2 table on model , Table1 and Table2
Column on Table1
ID | Content1
Column on Table2
ID | table1_id | Content2
i want to display Content in Table1 on Table2 , how to join column?
thanks advance!

subz
- 19
- 1
- 7
0
votes
1 answer
Field not initialized when persist object using JPARepository, @OneToMany <=> @ManyToOne
I have following entities:
MissionInfo:
@Entity
@Table(name = "mission_info")
public class MissionInfo implements Serializable {
@Id
@Column(name = "id")
@GeneratedValue
private Long id;
@OneToMany(cascade={CascadeType.ALL})
…

Nikolay Shabak
- 576
- 1
- 7
- 18
0
votes
1 answer
NPE with @JoinColumn and Play2 and Ebean
I have the following property in my entity :
@OneToOne
@JoinColumn(unique = true)
@NotNull(message = ValidatorUtils.ERROR_NOT_NULL)
public User user;
and I get the following stacktrace when I refresh my browser, while trying to generate database…

c4k
- 4,270
- 4
- 40
- 65
0
votes
1 answer
Use JoinColumn field in select query
I have the main entity class with the below fields where there is a field finid which references patient entity class. :-
public class Patientrel implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional =…

Ranjith Nair
- 475
- 1
- 6
- 17
0
votes
1 answer
Playframework! Relation between two models
I have to program a web application. The user has to be able to create a Questionnaire that contains a List of Question (so to create Question also).
I've created Questionnaire.java and Question.java and I've lokked for every way to link a List with…

user2524693
- 21
- 5
0
votes
0 answers
JPA @ManyToMany relation, @JoinTable and @JoinColumn @OrderBy
TABLE_A
ID
SORT
TABLE_B
ID
There is a REF Table by using these tables ManyToMany associated
TABLE_REF
A_ID
B_ID
I am gettind datas by using B.getAs()
I want to get As OrderBy TABLE_A.SORT field. For this, I try to add OrderBy, however it…

efirat
- 3,679
- 2
- 39
- 43