midgardproject / midgard-core

The base library of the Midgard Content Repository
http://midgard-project.org/docs/
Other
37 stars 6 forks source link

Cannot create Views using properties of same name from two classes #89

Closed bergie closed 13 years ago

bergie commented 13 years ago

I have two schemas.

<type name="com_meego_planet_feed" table="com_meego_planet_feed">
    <property name="id" type="unsigned integer" primaryfield="id">
        <description>Local non-replication-safe database identifier</description>
    </property>
    <property name="title" type="string">
        <description>Title of the article</description>
        <required>true</required>
        <property>dcterms:title</property>
    </property>
    ...

And

<type name="com_meego_planet_item" table="com_meego_planet_item" parent="com_meego_planet_feed">
    <property name="title" type="string">
        <description>Title of the article</description>
        <required>true</required>
        <property>dcterms:title</property>
    </property>
    <property name="feed" type="unsigned integer" link="com_meego_planet_feed:id" parentfield="feed">
        <description>Blog source the item comes from</description>
        <property>sioc:has_container</property>
    </property>
    ...

If I try to create a view that uses titles from both:

... View creation fails with invalid SQL that looks like `CREATE VIEW com_meego_planet_item_with_author AS SELECT FROM ...` (note the empty `SELECT`). If I comment the `feedtitle` property out the view works.
piotras commented 13 years ago

Do not free hashtable key, which implicitly frees its value (destroy func registered when hash table has been created) Closed by 55c676143c7f9c7ea1949f7063d653231618f841

piotras commented 13 years ago

I wasn't sure if it's related to gh-86. It's not. Closing.