[seasar-dotnet:1885] Re: [DBFlute]OutsideSQLのAutoPagingについてお教えください

kubo [E-MAIL ADDRESS DELETED]
2010年 11月 12日 (金) 14:56:05 JST


久保(jflute)です。

解決されたようでよかったです。
例外がわかりにくくですいませんでした。
今更ですが、次のバージョンからは、
「select 句のスイッチがされてないよ例外」
を発生させるようにしました。
(DBFlute, DBFlute.NET 両方で)

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
The count select for paging could not get a count.

[Advice]
A select clause of OutsideSql paging should be switchable like this:
For example:
  /*IF pmb.isPaging()*/
  select member.MEMBER_ID
       , member.MEMBER_NAME
       , ...
  -- ELSE select count(*)
  /*END*/
    from ...
   where ...

This specificaton is for both ManualPaging and AutoPaging.
(AutoPaging is only allowed to omit a paging condition)

[Table]
MEMBER

[OutsideSql]
selectPurchaseMaxPriceMember

[ParameterBean]
WxOutsideSqlPagingTest$MockAlwaysPagingTruePurchaseMaxPriceMemberPmb:{null,
null}

[Entity Type]
class com.example.dbflute.spring.dbflute.exentity.customize.SimpleMember
* * * * * * * * * */


2010/11/12  <[E-MAIL ADDRESS DELETED]>:
> 久保さん
>
> uparrowです。メール行き違いになってしまいました。
> ドキュメントの情報もありがとうございました。
>
>> (IFコメントで select 句の切り替えはされているでしょうか?)
> こちらが足りなかったようです。失礼いたしました。
>
> よろしくお願いいたします。
>
>> 久保(jflute)です。
>>
>> uparrowさん、こんにちは
>>
>> 外だしSQLはどのような書き方をされているでしょうか?
>> (IFコメントで select 句の切り替えはされているでしょうか?)
>>
>> また、こちらのドキュメントも参考にして下さい。
>> http://dbflute.sandbox.seasar.org/ja/manual/function/ormapper/outsidesql/select/selectpageauto.html
>>
>>
>> #
>> # 例外を工夫したいですねぇ...考えてみます
>> #
>>
>> 2010/11/12  <[E-MAIL ADDRESS DELETED]>:
>> > お世話になります。
>> > uparrowと申します。
>> >
>> > DBFluteでOutsideSQLを利用しAutoページングを行おうとしましたが、
>> > エラーが発生してしまい、取得できません。
>> > SQLの書き方か、使用方法に誤りがあるのだと思うのですが、
>> > サンプルを拝見しても誤りがわからず、メールさせていただきました。
>> > 基本的な内容の質問で申し訳ございません。
>> >
>> > エラー時のメッセージ内容は以下の通りです。
>> > Look! Read the message below.
>> > /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>> > The entity was Too Many! it has been duplicated. It should be the only one! But the resultCount=10
>> >
>> > [Advice]
>> > Please confirm your search condition. Does it really select the only one?
>> > Please confirm your database. Does it really exist the only one?
>> >
>> > [Search Condition]
>> > Table ?= T_SHUKKA
>> > Path ? = selectListForShukkaPlan
>> > Pmb ? ?= Hoge.ExDao.PmBean.ListForShukkaPlanPmb:ListForShukkaPlanPmb:{, , , , , , , , , , , , False}
>> > Entity = System.Int32
>> > Option = {paging=non, dynamic=False}
>> > * * * * * * * * * */
>> >
>> > SQLには
>> > SQL上のParameterBeanの定義にて、以下のようにSimplePagingBeanを継承しました。
>> > -- !df:pmb extends SPB!
>> > ほかは、通常のOutsideSQL用のSQLと同じです。
>> >
>> > 呼び出し部分は以下の通りです。
>> > ? ? ? ? ? ?ListForShukkaPlanPmb pmb = new ListForShukkaPlanPmb();
>> > ? ? ? ? ? ?pmb.Paging(50, 1);
>> >
>> > ? ? ? ? ? ?PagingResultBean<ListForShukkaPlan> shukkaPlanList;
>> > ? ? ? ? ? ?shukkaPlanList = tShukkaBhv.OutsideSql().AutoPaging().SelectPage<ListForShukkaPlan>(path, pmb);
>> >
>> > お手数をおかけしますが、ご指摘いただけると助かります。
>> > よろしくお願いいたします。
>> > --
>> > <[E-MAIL ADDRESS DELETED]>
>> >
>> > _______________________________________________
>> > 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
>
> --
>  <[E-MAIL ADDRESS DELETED]>
>
> _______________________________________________
> seasar-dotnet mailing list
> [E-MAIL ADDRESS DELETED]
> https://ml.seasar.org/mailman/listinfo/seasar-dotnet
>


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