I have a table with two fields invno and itemno, the invoic number gets repeated and so the item number also. If i give a query in sql like - select itemno from invno where invno=1, i get all the items associated with the invoice number.
how do i achieve the same thing in hibernate I have written a pojo for the table and also a mapping file and when I query the pojo I get a peculiar result for example
invno | itemno 1 | 20 1 | 10 1 | 5
when i issue the query like session.find("from inv where invno=1") and if i iterate the result, then it will display 20 20 20