Hey,

I'm building a small wiki "engine" using DataMapper to handle the
persistence. Let me explain my layout, and the riddle I encountered:

* Everything is a Page.
* Pages can have many childs, but only one parent.
* Pages with the same parent need to have distinct labels (titles,
  names...)

My first thought was adding :key => true to parent_id and label, but the
next second I thought that why I'd have all this as PK. Also, it would
force me to have *every* page parented somewhere. I could of course add
a Page called Wiki as root, or have root Pages come with a parent_id of
zero...

This is where I thought I'd ask a bit around. I'm sure you DM wizards
will have a magic answer, or at least a hint in the right direction.

TIA
-- 
Chris Hoeppner

Fingir no es mentir. 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to