facebook

Hibernate Reverse Engineer

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #267650 Reply

    modha
    Member

    Hi All

    I am using DBExplore reverse engineer on my two tables and could not solve this issue. I would like to know if we can handle my scenario with Reverse Engineering

    I have the following two tables..

    TableA [int colA, int colB, String colC, int data] : primary key [colA+colB+colC]
    TableB [int colX, int colY, String colZ, int data] : primary Key [colX+colY+colZ]

    TableA to TableB has 1->Many mapping.
    Foriegn Key for TableB is Primary Key of TableA.

    So based on an entry in TableA I should be able to find an entry in TableB.

    How do I generate finder methods like this..

    findBycolA : If I have just colA value in tableA -> get all matching rows from TableB which has same value in colX.
    Similarly findByColB, findByColC.

    findBycolA&colB: If I have values of colA and colB of TableA -> get all matching rows from TableB which has same values in colX and colY.
    Similary findBycolB&colC and findByColA&colC

    findBycolA&colB&colC

    Do I have to manually edit generated files. If so how do I handle when I regenerate.

    Please let me know.

    Thanks

    #267658 Reply

    Haris Peco
    Member

    modha,

    Your request are too specific and you have to make your methods.You can make another classes for your requests (using MyEclipse DAO as template or superclass) and they will not be overwritten when you regenerate.

    Regards,

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Hibernate Reverse Engineer

You must be logged in to post in the forum log in