• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need help on relation  RSS feed

Mathias Nilsson
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • 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?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!