Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ORM Patterns/Data structure question

 
Sharon whipple
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I hope this is the correct forum for such topic; I am looking for a correct data structure for this problem.
I have several types of objects of the same type plane, each plane has different lubrication due dates, some have 1 part to lubricate, some have 10 parts to lubricate

Type, lub dates:
  • Cessna # engine lub date # wheel lub date
  • Jet plane # engine lub date # wheel lub date # prop lub date
  • jumbo 747 # engine1 lub date # engine2 lub date # wheels lub date (total 15 columns)
  • Antonov (This one... ) #engine1 .. .engine n lub date# wheels lub date (total 20 columns)



  • As far as ORM I was thinking of a flat table with [plane type] column and all possible lub dates as columns
    My debate is the Java side – how to represent this using JPA/Hibernate objects
    Should I use hibernate inheritance? Drawback from in inheritance is the need to recompile the code for each new plane, and mass amount of java classes, another problem is the need to handle each class in the UI separately

    Please advice for better data structure for this problem
    Thank you

     
    Jan Cumps
    Bartender
    Posts: 2602
    13
    C++ Linux Netbeans IDE
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I moved your post to our Object Relational Mapping forum.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic