• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

MiddleGen generate relations

 
Ranch Hand
Posts: 120
IntelliJ IDE Hibernate Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
MiddleGen generates DTO and mapping files for Hibernate. Bisides defining all properties it generates full bunch all relations whenever it is necessary or not. Could this default behaviour be changed. I read all the docs available on middlegen web site and didn't find any clue that can help to solve the problem. Is everybody aware how this issue could be fixed?
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well as far my understanding it is not issue..
you can always control what middlegen creates using ANT.

Their are two ways of solving this..

1) using ant task

<many2many>
<tablea generate="true" name="LIBRARY" />
<jointable name="LIBRARY_BOOK" generate="false" />
<tableb generate="true" name="BOOK" />
</many2many>

2) or u can control by table ...

<table name="LIBRARY"></table>
now middlegen should generate mapping files for only LIBRARY table.and you can always add more <table> tags for more tables.

I hope that helps
 
reply
    Bookmark Topic Watch Topic
  • New Topic