I am having trouble mapping my database domain model to the program entities in one case where the entity is essentially a join table (a period) which combines two other ent
On a first glance, You're missing the generated value annotation in the embedded id class.
@Embeddable
public class PeriodId implements Serializable {
@GeneratedValue
@Column(name = "timeslot_idtimeslot")
private int timeslotId;
@GeneratedValue
@Column(name = "day_idday")
private int dayId;
//constructors, getters, setters, hashcode, and equals
}