Hi ...
I am having a problem.here is the situation:
I have 2 DTOs SelectionListDTO with the fields selectionListId,selectionListName and a listData[] (one to many associtaion with another dto ListDTO).
The second DTO ListDTO contains listId,listName,orderID.My tables are selction_list and list_data.
selection_list tabel consists of selection_list_id,selction_list_name.
list_data tabel consists of list_id,selection_list_id,list_name.
My problem is that i dont want to use a bidirectional mapping.I just want ton use a uni directional mapping i.e one-to-many association from SelectionListDTO to ListDTO .Can i use this ?WI need to query the ListDTO to get the listnames depending on the selctionlistid of the list_data table.The probelm is that i dont have any field in my ListDTO which represents the selection_list_id of the list_data table.How can i get all the list names with selectionlistid=someid.
if had an selectionlistid field in my ListDTO i would have easily quieried the ListDTO like select ld fro ListDTO ld where ld.selectionlistid=(select sl.selectionListId from SelectionListDTo sl where sl.selectionListName="some name".But since my ListDTo doesnt have any field representing the selection_list_id of the list_data table nor it has any association back to the SelectionListDTO.Kindly help me out if this is possible?Aniticipating valuable replies as earlu as possible..
|