• 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

Need help on relation

 
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Need some help on relation.

A Page can have many Blocks. This Page can be translated to another Language and when a Master updates a text then the translations must have a notification

There are 5 different type of Blocks in a Page. Image, Text, Table, Cell, Empty

All Blocks have width, Height, X, Y, color and some other data in common.
A Text block can have many versions. A Table Block can Hold Cell Blocks. A Cell block can have many versions ( It's a text block but inside a table) A Empty block is just a plain block. A Image block can have only one Image but needs notification if master has changed it's image.

When a master has created the block. And a translation is done. I need to know wich is the master block for the translation. ie Block.getMaster() And for a Cell Block.getParent(), Block.getMaster()

A Cell needs to know it's Table block. And if it's a translation Table needs to know of its table and cell needs to know of it's cell.

If a masterblock is deleted all translation block should to.

I'm having difficluties on how to implement this. Can anyone help me to the right track?
 
reply
    Bookmark Topic Watch Topic
  • New Topic