Hi,
Problem 1 : I'm developping a bank system, and I need to load operations relying on a customer. At first, I m interesting to customers, so I do not need operations, I have choosen the lazy loading for operations set. But once I want to get a customers operations, I need to limit them, of course, because each one, can have many thousands ones.
So, can I specify the objects loaded number ? or, there is an other easier way ?
Problem 2: I have in my database a many-to-many association between two tables, so realy, I have 3 three table with two associations many-to-one, many-to-one.
Exemple :
Group stydies in a classroom. Group can study in many classroom, and in a classroom, many group can study, in my database, I need to have three table (I suppose that my server does not support many-to-many relations) Group, ClassRoom and Study.
in this case, study will have some informations, such as time, professor, ...
in my mapping files, I will have on the both sides something like :
<set name="" table=""> <key column=""/> <many-to-many column="" class=""/> </set>
My question is, in witch mapping-file and how can I map the others fields of Study table ?
Thank's. Best regards.
|