1

私は次のデータベース構造を持っています:

Account:
    columns:
        email: string(255)
        name:
            type: string(255)

UserRegistered:
    columns:
        email:
            type: string(255)
            email: true
            notnull: true
            unique: true
        username:
            type: string(255)
            notnull: true
            nospace: true
            unique: true
            minlength: 5
        password:
            type: string(255)
        token: string(255)
    inheritance:
        extends: Account
        type: concrete

UserOpenid:
   columns:
       openid: string(255)
       openid_provider: string(255)
   inheritance:
       extends: Account
       type: concrete

新しいUserRegisteredまたはUserOpenidレコードを挿入すると、AccountレコードだけでなくUserRegisteredレコードも作成されると期待していました。

継承を誤解しましたか/誤用しましたか、それとも何か間違ったことをしましたか?

4

1 に答える 1

0

具体的な継承を使用する場合、マスターテーブルは常に空になります。マスターテーブルのすべてのフィールドが子テーブルに複製されます。したがって、マスターテーブルに書き込む必要はありません。

于 2009-12-17T14:39:02.507 に答える