I have a messy database, not normalized, doesnt have
the right primary key and foreign key mappings.
My tables are linked by fields which are not specified
as foreign keys.
My two tables in question are
Table 1
id [Comp Key]
no [Comp Key]
desc
Table 2
name [pkey]
tb1id
value
I need to do an outer join to table1 from table2
and get the associated desc value for the tb1id mapped to the
id value of table 1 given a particular constant value for the no. field.
Basically I need all rows of table 2 with associated desc values of
table 1 if present for a particular string value of no. field of table 1.
These tables are not linked in the config files by mappings
so i am not able to do an outer join query through hibernate
any suggestions would be really helpful
thanks
|