views:

18

answers:

0
  1. How to convert hibernate entity class having many to many mapping.
  2. i have a class that has two many to many collection mapping. i can convert that entity class to the destination object but the problem is for the collection set

    Set<Address> s; -----------1
    

1 there is a generic set of Address class.And the Address class look like bellow.

  class Address{
    @Many-To-Maney()
    Set Block block;
    String Address;
    private setBlock(Set<Block> block)
    {
    this.block=block;
    }
}
Class Block{
 @Many-To-Maney()
private  Building b;

}

Now how do i convert the Address entity class to my DTO bean.