Hallo everyone,
I am new to the Google app engine. So far I like it a lot.
My question:
I want to implement a hierarchical datamodel where there is a common
superclass A, 2 subclasses B and C and one class D that inherits from
B as well as from C.
So:
A->[]
B->[A]
C->[A]
D->[B,C]
in normal pyth
Hallo,
I read up the solution for implementing 1:n relationships by placing a
ReferenceProperty on the "n" part and naming the collection_name the
name you want to appear in the "1" part.
I have a datamodel with hierarchical inheritance.
For Some Element D I want to have a 1:n relationship to a
Thanks for your replies.
On 24 Feb., 20:02, theillustratedlife wrote:
> Don't type the ReferenceProperty.
You mean subclassing the ReferenceProperty? I don't want to do that.
Otherwise, I don't understand what you mean...
>
> You've got to be careful though. If you have A ref'ing B and B
> ref'
This is a minimal example of the stuff that I want to do.
class PMethod(PElement):
body = db.StringProperty()
class PElement(PolyModel):
name = db.StringProperty()
pMethodInput = db.ReferenceProperty(MetaPMethod,
collection_name='input')
pMethodOutput = db.ReferenceProperty(MetaP