« first day (1279 days earlier)      last day (1660 days later) » 

7:47 AM
// parent entity has simple primary key

@Entity
public class Employee {
@Id long empId;
String name;
...
}

// dependent entity uses EmbeddedId for composite key

@Embeddable
public class DependentId {
String name;
long empid; // corresponds to primary key type of Employee
}

@Entity
public class Dependent {
@EmbeddedId DependentId id;
...
@MapsId("empid") // maps the empid attribute of embedded id
@ManyToOne Employee emp;
}
 
1 message moved from Java
 
 
6 hours later…
mr5
2:08 PM
a
b
hahaha
hahahaha
wtf
a
b
c
d
e
f
new message!
a
b
c
d
e
dsadasdsadasd
wtf
aaaa
wtf
hahaha
sdasdasd
sadasd
asd
dsadsadasdsa
test
asdasd
hahahaha
hehehehe
aaa
asdsadsadsad
 

« first day (1279 days earlier)      last day (1660 days later) »