[seasar-dotnet:1056] Re: DBFlute - 共通カラムのフラグ設定について

kubo [E-MAIL ADDRESS DELETED]
2008年 10月 22日 (水) 19:02:19 JST


久保(jflute)です。

なるほど、了解です。
サブクラスの方には、ClassifiXxx()は生成されていますでしょうか?
(EntityDefinedCommonColumnに無いだけなのか、
 そもそも生成されていないのかの区別を付けたいです)

2008/10/22 k. moriwaki <[E-MAIL ADDRESS DELETED]>:
> 久保さん
> 森脇です
>
> すいません、ちょっと急いで書いたメールだったのでいろいろ
> 情報が不足していたようです…
>
>> dbflute-nbasic-exampleのdfprop配下の
>> classificationDefinitionMapおよびclassificationDeploymentMapを
>> 参考にしてみて下さい。
> この両方は作成済みです。
> 実際のBsEntityにはClassifyDeleteFlgOff というメソッドが存在しています。
>
>
>
>
> 2008/10/22 17:59 kubo <[E-MAIL ADDRESS DELETED]>:
>> 久保(jflute)です。
>>
>> 区分値機能はこれはこれで独立した機能でして、
>> 別途設定をする必要があります。
>> http://dbflute.sandbox.seasar.org/contents/setup/classification.html
>> (設定するとClassifyDeleteFlgOff()が生成されます)
>>
>> って、「現場ソリューションみてくれ」って感じになってますね。。。
>> dbflute-nbasic-exampleのdfprop配下の
>> classificationDefinitionMapおよびclassificationDeploymentMapを
>> 参考にしてみて下さい。
>>
>>
>>
>> 2008/10/22 k. moriwaki <[E-MAIL ADDRESS DELETED]>:
>>> 森脇と申します。
>>>
>>> 共通カラムの設定 - 「補足:区分値機能との併用」を試そうと設定してみたのですが
>>> 出力されたソースがコンパイルエラーになりました。
>>>
>>> ----- エラーログ -----
>>> エラー     1       'App.DB.AllCommon.EntityDefinedCommonColumn' に
>>> 'ClassifyDeleteFlgOff'
>>> の定義がありません。      C:hoge\source\App.DB\AllCommon\Bhv\AbstractBehaviorWritable.cs  219     20      App.DB
>>>
>>>
>>> 出力されたソースを見たところ AbstractBehaviorWritable.cs の共通カラムの値を
>>> 設定しているメソッドでエラーが発生しており、EntityDefinedCommonColumn
>>> に論理削除フラグを設定するメソッドが定義されていないためエラーになっているようです。
>>> 設定は以下の通りですが、何かたいりない設定などありますでしょうか?
>>>
>>> 参考としたページ
>>> http://dbflute.sandbox.seasar.org/contents/setup/commoncolumn.html
>>>
>>>
>>> ===== DBFlute 設定ファイル =====
>>>
>>> ----- commonColumnMap.dfprop -----
>>> map:{
>>>    ; commonColumnMap = map:{
>>>        ; DELETE_FLG      = CHAR
>>>    }
>>>    ; beforeInsertMap = map:{
>>>        ; DELETE_FLG      = $entity.ClassifyDeleteFlgOff()$$Semicolon$$
>>>    }
>>>    ; beforeUpdateMap = map:{
>>>    }
>>> }
>>>
>>> ===== 出力されたソース =====
>>>
>>> ----- AbstractBehaviorWritable.cs -----
>>> (略)
>>>        protected virtual void SetupCommonColumnOfInsertIfNeeds(Entity
>>> targetEntity) {
>>>            if (!IsEntityDefinedCommonColumn(targetEntity)) {
>>>                return;
>>>            }
>>>            EntityDefinedCommonColumn entity =
>>> (EntityDefinedCommonColumn)targetEntity;
>>>            if (!entity.CanCommonColumnAutoSetup()) {
>>>                return;
>>>            }
>>>            if (_log.IsDebugEnabled) {
>>>                _log.Debug("...Filtering entity of INSERT about the
>>> column columns of " + this.TableDbName);
>>>            }
>>>
>>>            entity.ClassifyDeleteFlgOff();
>>>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  ※※※ ここでエラー ※※※
>>>        }
>>> (略)
>>>
>>> ----- EntityDefinedCommonColumn  -----
>>> (略)
>>>    public interface EntityDefinedCommonColumn : Entity {
>>>
>>>        String DeleteFlg { get; set; }
>>>
>>>        void DisableCommonColumnAutoSetup();
>>>            bool CanCommonColumnAutoSetup();
>>>   }
>>> (略)
>>> _______________________________________________
>>> seasar-dotnet mailing list
>>> [E-MAIL ADDRESS DELETED]
>>> https://ml.seasar.org/mailman/listinfo/seasar-dotnet
>>>
>> _______________________________________________
>> seasar-dotnet mailing list
>> [E-MAIL ADDRESS DELETED]
>> https://ml.seasar.org/mailman/listinfo/seasar-dotnet
>>
> _______________________________________________
> seasar-dotnet mailing list
> [E-MAIL ADDRESS DELETED]
> https://ml.seasar.org/mailman/listinfo/seasar-dotnet
>


seasar-dotnet メーリングリストの案内