Fórum

Date型をキーとした場合のService.xmlの記述について

tsuyoshi futamase, modificado 11 Anos atrás.

Date型をキーとした場合のService.xmlの記述について

New Member Postagens: 7 Data de Entrada: 05/01/11 Postagens Recentes
ウィンクス株式会社 二間瀬(ふたませ)と申します。


サービスビルダー:Service.xmlの記述について質問です。

Date型のカラムをプライマリキーにしたService.xmlでは、Date型に
Nullが設定できるため、サービスビルダーでエラーが発生します。

<!-- PK fields -->

<column name="CUSTOMER_NUMBER" type="long" primary="true" />
<column name="HIZUKE_JIKOKU" type="Date" primary="true" />

Date型をキーとする場合、サービスビルダーは利用できないのでしょうか?
データベースは、PosrgreSQLを使用しています。

以上、よろしくお願いします。
失礼します。

------------------------------------
ウィンクス株式会社
システム事業部
二間瀬 剛(tsuyoshi futamase)
e-mail : winx-futamase@sat.bbiq.jp
------------------------------------
thumbnail
David H Nebinger, modificado 11 Anos atrás.

RE: Date型をキーとした場合のService.xmlの記述について

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
By declaring the date as a primary column, it in turn becomes a primary key in the database w/ the not null attribute.

To use a nullable date, it cannot be part of the primary key.
tsuyoshi futamase, modificado 11 Anos atrás.

RE: Date型をキーとした場合のService.xmlの記述について

New Member Postagens: 7 Data de Entrada: 05/01/11 Postagens Recentes
Thank You David for the quick response.

Regards
Tsuyoshi Futamase
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: Date型をキーとした場合のService.xmlの記述について

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
David, you missed the point of the question. You translation program didn't translate the question correctly.
He is saying that by declaring a date type entity as a primary key, he can enter value null, which results in an error.
He's asking if because of this limitation, whether he's able to use date type as a primary key.

Well, as you've pointed out, primary keys should have not null attribute in the database. The question is there is a bug in service builder
which in not setting not null attributes on primary keys with datatype date or if he's just using it incorrectly.

BTW, I'm trying to allow liferay.com to reply some of the questions in the Japanese forum first because it seems Daniel Kiyotomo Ozeki
wants to show how he can help users. He personally requested it, and I want to give him an opportunity for a while. emoticon
tsuyoshi futamase, modificado 11 Anos atrás.

RE: Date型をキーとした場合のService.xmlの記述について

New Member Postagens: 7 Data de Entrada: 05/01/11 Postagens Recentes
小沢様

当社の補足説明ありがとうございます。
小沢様が検索された企業は、社名が同じ別の企業でしたので訂正させてください。

当社(ウィンクス)は、一般企業向けのソフトウェアを開発する会社で、
URLは、以下の通りです。
http://www.winx-sakura.jp

以上です。
失礼します。

------------------------------------
ウィンクス株式会社
システム事業部
二間瀬 剛(tsuyoshi futamase)
e-mail : winx-futamase@sat.bbiq.jp
------------------------------------
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: Date型をキーとした場合のService.xmlの記述について

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
二間瀬様、

会社を間違えて大変申し訳ございませんでした。
以前、弊社にご連絡して頂いた時は予算が限られているためにCE版の利用を検討していると言う記録がありました。

もう既に御存じだと思いますが、日本Liferayの設立の準備が進められています。もしEE版にご興味が
ある場合は、Liferay社の大関様に連絡してください。