I need a bit of help with setting up a mapping file or 2. I have a
POJO called Filter. I use this to store options from the user as for
search criteria. I have a database that relates to this filter.
The problem I am having is I have 2 List properties that are part of
Filter. 1 is Status and the other is Users. I have both the Status
class and User class mapped with iBatis. No problem there.
I have created 2 more tables. t_filter_status and
t_filter_assignment. t_filter_status stores a filterId and a
statusId. t_filter_assignment also holds a filterId and a userId.
I need to create the Filter mapping in iBatis so that when I save the
Filter object to the database, I also create records in the
t_filter_status and t_filter_assingment tables. This may just be a
matter of getting the SQL right but I am not 100% sure if I am even
thinking about this the right way. Here is an example
t_filter
------------------------------------------------------
- 1 - filtername - 04/24/05 - 04/25/05 -
------------------------------------------------------
t_filter_status
-----------
- 1 - 2 -
- 1 - 0 -
- 1 - 1 -
----------
t_filter_assignment
-----------------
- 1 - 9715 -
- 1 - 8765 -
----------------
I hope this makes some sense. If you need more information just let me know.
Thanks
Gregg
|
|