hibernate many to many mappings for join table with extra columns , surrogate key, additional primary key
I'm having hard time to resolve entity mappings (using annotations) for the following scenarios ( from legacy db)

 **Scenario 1:**
 
    Table A
      A_ID (PK)
 
    Table B    
      B_ID (PK)
 
    TABLE A_B    
      AB_ID (PK)    
      A_ID (FK)    
      B_ID (FK)    
      Created_DATE
 
 **Scenario 2:**
 
    Table A    
      A_ID (PK)
 
    Table B    
      B_ID (PK)
 
    TABLE A_B    
      AB_ID (PK)    
      A_ID (PK)(FK)    
      Test_Date (PK)    
      B_ID (FK)    
      Created_DATE
 
 **Scenario 3:**
 
 
    Table A
      A_ID (PK)             
      A2_ID (PK)
 
    Table B    
      B_ID (PK)
 
    TABLE A_B    
      A_ID (PK)(FK)    
      A2_ID (PK)(FK)    
      B_ID (PK)(FK)   
      Created_DATE

Could some one kind enough to show these entities in hibernate using annotations and with explanation please?

hibernate many to many mappings for join table with extra columns , surrogate key, additional primary key
===

I'm having hard time to resolve entity mappings (using annotations) for the following scenarios ( from legacy db)

 **Scenario 1:**
 
    Table A
      A_ID (PK)
 
    Table B    
      B_ID (PK)
 
    TABLE A_B    
      AB_ID (PK)    
      A_ID (FK)    
      B_ID (FK)    
      Created_DATE
 
 **Scenario 2:**
 
    Table A    
      A_ID (PK)
 
    Table B    
      B_ID (PK)
 
    TABLE A_B    
      AB_ID (PK)    
      A_ID (PK)(FK)    
      Test_Date (PK)    
      B_ID (FK)    
      Created_DATE
 
 **Scenario 3:**
 
 
    Table A
      A_ID (PK)             
      A2_ID (PK)
 
    Table B    
      B_ID (PK)
 
    TABLE A_B    
      A_ID (PK)(FK)    
      A2_ID (PK)(FK)    
      B_ID (PK)(FK)   
      Created_DATE

Could some one kind enough to show these entities in hibernate using annotations and with explanation please?
