I have activity and workout tables where workout is a parent and activity is a child meaning each workout contains one or more activities.
activity
activity_id
name
distance
workout
workout_id
name
start_time
activity_ids varchar(200) - this columns contains comma separated string values(1,2,3...)
I am using Spring-JDBC for DAO layer and each table has its DAO class (ActivityDAO and WorkoutDAO). I wonder in which DAO I need place code for retrieving workouts along with their activities in one query because WorkoutDAO does not contain RowMapper for building activity objects and vice versa. Can anyone please help me with the best way of doing this?
Aucun commentaire:
Enregistrer un commentaire