Re: [JBoss-user] PostgreSQL and NOT NULL integer fields
Could you please send/submit the patch to XDoclet project? Thank you! Ivens Porto wrote: Alexey Loubyansky wrote: You are trying to use uknown and 'known' primary keys at the same time. You must use either one. Just remove unknown-pk. Yes, you need to use jdbc-type/sql-type in key-field. Alexey, thanks for you help, I did what you recommended and it works now. I also modified the xdoclet template for jbosscmp-jdbc.xml to make xdoclet support "jdbc-type" and "sql-type" in the jboss.relation tag, if any one is interested in the modified template, please send me an e-mail. --- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] PostgreSQL and NOT NULL integer fields
Alexey Loubyansky wrote: > > You are trying to use uknown and 'known' primary keys at the same time. > You must use either one. Just remove unknown-pk. > Yes, you need to use jdbc-type/sql-type in key-field. > Alexey, thanks for you help, I did what you recommended and it works now. I also modified the xdoclet template for jbosscmp-jdbc.xml to make xdoclet support "jdbc-type" and "sql-type" in the jboss.relation tag, if any one is interested in the modified template, please send me an e-mail. > Ivens Porto wrote: > > > Alexey Loubyansky wrote: > > > >>Yes, it should. It is not yet clear for me how the fk field accord to be > >>non-null. All fk fields allow null values by default. Perhaps, it came > >>from sql-type? Could you, please, post the declaration of the unknown pk > >>from your DDs? > > > > > > Below is the declaration of my entity bean (it is generated by xdoclet): > > > > > > MovieDayOfWeekSchedule > > t_movie_day_of_week_schedule > > > > > > id > > > > INTEGER > > SERIAL > > > > > > > > > > startDay > > > > > > > > endDay > > > > > > > > startDayIntValue > > > > > > > > endDayIntValue > > > > > > > > > > java.lang.Integer > > INTEGER > > SERIAL > > > > > > > > > > > > > > I found a solution to avoid creating the fk as not null: just add > > INTEGER and INTEGER in the > > for the bean relationship. After this JBoss created the fk > > field just as INTEGER. > > > > But then another problem, xdoclet does not support specifing the > > and in the tag @jboss.relation. Has any one > > hacked the jboss templates in xdoclet to handle this? > > > > > >>Ivens Porto wrote: > >> > >> > >>>Alexey Loubyansky wrote: > >>> > >>> > It works for me. > > public abstract Integer getIntegerField(); > public abstract void setIntegerField(Integer value); > > public abstract int getIntField(); > public abstract void setIntField(int value); > > 12:30:34,262 DEBUG [Child] Executing SQL: CREATE TABLE CHILD(CHILD_ID > BIGINT NOT NULL, name VARCHAR(250) BINARY, integerField INTEGER, > intField INTEGER NOT NULL, PARENT_FK BIGINT, CONSTRAINT pk_CHILD PRIMARY > KEY (CHILD_ID)) > > Do you have a testcase? > > >>> > >>> > >>>Thanks to other posts I now see the reason for setting int fields as not > >>>null. > >>> > >>>After digging a bit more I found that actually the problem I'm having is > >>>bit different. > >>> > >>> > >>>I have a 1->N bidirectional relation. > >>> > >>>On the 1 side of the relation the pk field is an unknown pk with > >>>auto-increment. With Postgresql JBoss correctly uses the type SERIAL for > >>>this pk field. This pk is used as a fk on the N side of the relation. > >>> > >>>So, when JBoss creates the table for N side of the relation is adds a > >>>column for the fk, and the type for the fk column is the same type used > >>>on the 1 side of the relation, in this case: SERIAL. > >>> > >>>The problem is that on the N side of the relation I have some beans that > >>>are not associated with any bean on the 1 side. Then when I create a > >>>bean on the N side, without an associated bean on the 1 side, I got an > >>>exception telling me that JBoss cannot insert a null value on the fk > >>>column. > >>> > >>>This happens because the type of the fk field is SERIAL, the same type > >>>used as the pk on the 1 side of the relation, that in Postgresql is of > >>>type: > >>> > >>>"integer | not null default > >>>nextval('public.t_movie_day_of_week_schedule_movieid_seq'::text)" > >>> > >>>My question then is: when a pk field is of type unknown with > >>>auto-increment and it's used as a fk field in a relation, shouldn't the > >>>fk colunm type be just INTEGER instead of SERIAL? > >>> > >>> > >>> > >>> > Thanks, > > alex > > Ivens Porto wrote: > > > > >Hi, > > > >I'm using JBoss 3.2.2 and PostgreSQL 7.3.4. > > > >JBoss is doing something that I can't figure out why. > > > >In my CMP beans, JBoss always use the constraint NOT NULL for fields of > >type integer, even thought I don't set the property in > >jbosscmp-jdbc.xml for the fields. > > > >If the persistent field in the CMP bean is of type int or Integer, JBoss > >creates the database table with the constraint NOT NULL for integer type > >fields. > > > >Does anyone knows why JBoss does this? > > >>--- > >>This SF.net email is sponsored by: SF.net Giveback Program. > >>Does SourceForge.net help you be more productive? Does it > >>help you create better code? SHARE THE LOVE, and help us help > >>YOU! Click Here: http://sourceforge.net/donate/ > >>_
Re: [JBoss-user] PostgreSQL and NOT NULL integer fields
You are trying to use uknown and 'known' primary keys at the same time. You must use either one. Just remove unknown-pk. Yes, you need to use jdbc-type/sql-type in key-field. Ivens Porto wrote: Alexey Loubyansky wrote: Yes, it should. It is not yet clear for me how the fk field accord to be non-null. All fk fields allow null values by default. Perhaps, it came from sql-type? Could you, please, post the declaration of the unknown pk from your DDs? Below is the declaration of my entity bean (it is generated by xdoclet): MovieDayOfWeekSchedule t_movie_day_of_week_schedule id INTEGER SERIAL startDay endDay startDayIntValue endDayIntValue java.lang.Integer INTEGER SERIAL I found a solution to avoid creating the fk as not null: just add INTEGER and INTEGER in the for the bean relationship. After this JBoss created the fk field just as INTEGER. But then another problem, xdoclet does not support specifing the and in the tag @jboss.relation. Has any one hacked the jboss templates in xdoclet to handle this? Ivens Porto wrote: Alexey Loubyansky wrote: It works for me. public abstract Integer getIntegerField(); public abstract void setIntegerField(Integer value); public abstract int getIntField(); public abstract void setIntField(int value); 12:30:34,262 DEBUG [Child] Executing SQL: CREATE TABLE CHILD(CHILD_ID BIGINT NOT NULL, name VARCHAR(250) BINARY, integerField INTEGER, intField INTEGER NOT NULL, PARENT_FK BIGINT, CONSTRAINT pk_CHILD PRIMARY KEY (CHILD_ID)) Do you have a testcase? Thanks to other posts I now see the reason for setting int fields as not null. After digging a bit more I found that actually the problem I'm having is bit different. I have a 1->N bidirectional relation. On the 1 side of the relation the pk field is an unknown pk with auto-increment. With Postgresql JBoss correctly uses the type SERIAL for this pk field. This pk is used as a fk on the N side of the relation. So, when JBoss creates the table for N side of the relation is adds a column for the fk, and the type for the fk column is the same type used on the 1 side of the relation, in this case: SERIAL. The problem is that on the N side of the relation I have some beans that are not associated with any bean on the 1 side. Then when I create a bean on the N side, without an associated bean on the 1 side, I got an exception telling me that JBoss cannot insert a null value on the fk column. This happens because the type of the fk field is SERIAL, the same type used as the pk on the 1 side of the relation, that in Postgresql is of type: "integer | not null default nextval('public.t_movie_day_of_week_schedule_movieid_seq'::text)" My question then is: when a pk field is of type unknown with auto-increment and it's used as a fk field in a relation, shouldn't the fk colunm type be just INTEGER instead of SERIAL? Thanks, alex Ivens Porto wrote: Hi, I'm using JBoss 3.2.2 and PostgreSQL 7.3.4. JBoss is doing something that I can't figure out why. In my CMP beans, JBoss always use the constraint NOT NULL for fields of type integer, even thought I don't set the property in jbosscmp-jdbc.xml for the fields. If the persistent field in the CMP bean is of type int or Integer, JBoss creates the database table with the constraint NOT NULL for integer type fields. Does anyone knows why JBoss does this? --- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] PostgreSQL and NOT NULL integer fields
Alexey Loubyansky wrote: > > Yes, it should. It is not yet clear for me how the fk field accord to be > non-null. All fk fields allow null values by default. Perhaps, it came > from sql-type? Could you, please, post the declaration of the unknown pk > from your DDs? Below is the declaration of my entity bean (it is generated by xdoclet): MovieDayOfWeekSchedule t_movie_day_of_week_schedule id INTEGER SERIAL startDay endDay startDayIntValue endDayIntValue java.lang.Integer INTEGER SERIAL I found a solution to avoid creating the fk as not null: just add INTEGER and INTEGER in the for the bean relationship. After this JBoss created the fk field just as INTEGER. But then another problem, xdoclet does not support specifing the and in the tag @jboss.relation. Has any one hacked the jboss templates in xdoclet to handle this? > > Ivens Porto wrote: > > > Alexey Loubyansky wrote: > > > >>It works for me. > >> > >>public abstract Integer getIntegerField(); > >>public abstract void setIntegerField(Integer value); > >> > >>public abstract int getIntField(); > >>public abstract void setIntField(int value); > >> > >>12:30:34,262 DEBUG [Child] Executing SQL: CREATE TABLE CHILD(CHILD_ID > >>BIGINT NOT NULL, name VARCHAR(250) BINARY, integerField INTEGER, > >>intField INTEGER NOT NULL, PARENT_FK BIGINT, CONSTRAINT pk_CHILD PRIMARY > >>KEY (CHILD_ID)) > >> > >>Do you have a testcase? > >> > > > > > > Thanks to other posts I now see the reason for setting int fields as not > > null. > > > > After digging a bit more I found that actually the problem I'm having is > > bit different. > > > > > > I have a 1->N bidirectional relation. > > > > On the 1 side of the relation the pk field is an unknown pk with > > auto-increment. With Postgresql JBoss correctly uses the type SERIAL for > > this pk field. This pk is used as a fk on the N side of the relation. > > > > So, when JBoss creates the table for N side of the relation is adds a > > column for the fk, and the type for the fk column is the same type used > > on the 1 side of the relation, in this case: SERIAL. > > > > The problem is that on the N side of the relation I have some beans that > > are not associated with any bean on the 1 side. Then when I create a > > bean on the N side, without an associated bean on the 1 side, I got an > > exception telling me that JBoss cannot insert a null value on the fk > > column. > > > > This happens because the type of the fk field is SERIAL, the same type > > used as the pk on the 1 side of the relation, that in Postgresql is of > > type: > > > > "integer | not null default > > nextval('public.t_movie_day_of_week_schedule_movieid_seq'::text)" > > > > My question then is: when a pk field is of type unknown with > > auto-increment and it's used as a fk field in a relation, shouldn't the > > fk colunm type be just INTEGER instead of SERIAL? > > > > > > > >>Thanks, > >> > >>alex > >> > >>Ivens Porto wrote: > >> > >> > >>>Hi, > >>> > >>>I'm using JBoss 3.2.2 and PostgreSQL 7.3.4. > >>> > >>>JBoss is doing something that I can't figure out why. > >>> > >>>In my CMP beans, JBoss always use the constraint NOT NULL for fields of > >>>type integer, even thought I don't set the property in > >>>jbosscmp-jdbc.xml for the fields. > >>> > >>>If the persistent field in the CMP bean is of type int or Integer, JBoss > >>>creates the database table with the constraint NOT NULL for integer type > >>>fields. > >>> > >>>Does anyone knows why JBoss does this? > >> > > > > --- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user -- _/_/_/ _/_/_/_/_/_/ Ivens Porto _/ _/_/_/ OSE - Open Systems Engineering _/ _/_/_/ http://www.ose.com.br _/ _/ _/_/_/ _/_/_/_/ Phone: (55) 34 - 3214-5995 _/ _/_/_/ Fax: (55) 34 - 3214-5994 _/ _/_/_/ _/_/_/_/_/_/ _/_/_/ --- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate
Re: [JBoss-user] PostgreSQL and NOT NULL integer fields
"accord" should be read "occured" ;) Alexey Loubyansky wrote: Yes, it should. It is not yet clear for me how the fk field accord to be non-null. All fk fields allow null values by default. Perhaps, it came from sql-type? Could you, please, post the declaration of the unknown pk from your DDs? --- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] PostgreSQL and NOT NULL integer fields
Yes, it should. It is not yet clear for me how the fk field accord to be non-null. All fk fields allow null values by default. Perhaps, it came from sql-type? Could you, please, post the declaration of the unknown pk from your DDs? Ivens Porto wrote: Alexey Loubyansky wrote: It works for me. public abstract Integer getIntegerField(); public abstract void setIntegerField(Integer value); public abstract int getIntField(); public abstract void setIntField(int value); 12:30:34,262 DEBUG [Child] Executing SQL: CREATE TABLE CHILD(CHILD_ID BIGINT NOT NULL, name VARCHAR(250) BINARY, integerField INTEGER, intField INTEGER NOT NULL, PARENT_FK BIGINT, CONSTRAINT pk_CHILD PRIMARY KEY (CHILD_ID)) Do you have a testcase? Thanks to other posts I now see the reason for setting int fields as not null. After digging a bit more I found that actually the problem I'm having is bit different. I have a 1->N bidirectional relation. On the 1 side of the relation the pk field is an unknown pk with auto-increment. With Postgresql JBoss correctly uses the type SERIAL for this pk field. This pk is used as a fk on the N side of the relation. So, when JBoss creates the table for N side of the relation is adds a column for the fk, and the type for the fk column is the same type used on the 1 side of the relation, in this case: SERIAL. The problem is that on the N side of the relation I have some beans that are not associated with any bean on the 1 side. Then when I create a bean on the N side, without an associated bean on the 1 side, I got an exception telling me that JBoss cannot insert a null value on the fk column. This happens because the type of the fk field is SERIAL, the same type used as the pk on the 1 side of the relation, that in Postgresql is of type: "integer | not null default nextval('public.t_movie_day_of_week_schedule_movieid_seq'::text)" My question then is: when a pk field is of type unknown with auto-increment and it's used as a fk field in a relation, shouldn't the fk colunm type be just INTEGER instead of SERIAL? Thanks, alex Ivens Porto wrote: Hi, I'm using JBoss 3.2.2 and PostgreSQL 7.3.4. JBoss is doing something that I can't figure out why. In my CMP beans, JBoss always use the constraint NOT NULL for fields of type integer, even thought I don't set the property in jbosscmp-jdbc.xml for the fields. If the persistent field in the CMP bean is of type int or Integer, JBoss creates the database table with the constraint NOT NULL for integer type fields. Does anyone knows why JBoss does this? --- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] PostgreSQL and NOT NULL integer fields
Alexey Loubyansky wrote: > > It works for me. > > public abstract Integer getIntegerField(); > public abstract void setIntegerField(Integer value); > > public abstract int getIntField(); > public abstract void setIntField(int value); > > 12:30:34,262 DEBUG [Child] Executing SQL: CREATE TABLE CHILD(CHILD_ID > BIGINT NOT NULL, name VARCHAR(250) BINARY, integerField INTEGER, > intField INTEGER NOT NULL, PARENT_FK BIGINT, CONSTRAINT pk_CHILD PRIMARY > KEY (CHILD_ID)) > > Do you have a testcase? > Thanks to other posts I now see the reason for setting int fields as not null. After digging a bit more I found that actually the problem I'm having is bit different. I have a 1->N bidirectional relation. On the 1 side of the relation the pk field is an unknown pk with auto-increment. With Postgresql JBoss correctly uses the type SERIAL for this pk field. This pk is used as a fk on the N side of the relation. So, when JBoss creates the table for N side of the relation is adds a column for the fk, and the type for the fk column is the same type used on the 1 side of the relation, in this case: SERIAL. The problem is that on the N side of the relation I have some beans that are not associated with any bean on the 1 side. Then when I create a bean on the N side, without an associated bean on the 1 side, I got an exception telling me that JBoss cannot insert a null value on the fk column. This happens because the type of the fk field is SERIAL, the same type used as the pk on the 1 side of the relation, that in Postgresql is of type: "integer | not null default nextval('public.t_movie_day_of_week_schedule_movieid_seq'::text)" My question then is: when a pk field is of type unknown with auto-increment and it's used as a fk field in a relation, shouldn't the fk colunm type be just INTEGER instead of SERIAL? > Thanks, > > alex > > Ivens Porto wrote: > > > Hi, > > > > I'm using JBoss 3.2.2 and PostgreSQL 7.3.4. > > > > JBoss is doing something that I can't figure out why. > > > > In my CMP beans, JBoss always use the constraint NOT NULL for fields of > > type integer, even thought I don't set the property in > > jbosscmp-jdbc.xml for the fields. > > > > If the persistent field in the CMP bean is of type int or Integer, JBoss > > creates the database table with the constraint NOT NULL for integer type > > fields. > > > > Does anyone knows why JBoss does this? > -- _/_/_/ _/_/_/_/_/_/ Ivens Porto _/ _/_/_/ OSE - Open Systems Engineering _/ _/_/_/ http://www.ose.com.br _/ _/ _/_/_/ _/_/_/_/ Phone: (55) 34 - 3214-5995 _/ _/_/_/ Fax: (55) 34 - 3214-5994 _/ _/_/_/ _/_/_/_/_/_/ _/_/_/ --- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] PostgreSQL and NOT NULL integer fields
Ivens, your int CMP fields should definitely be NOT NULL. Consider what happens if you have a NULL int column. What should happen when you read a NULL value from the DB? int i = null; is not valid Java code. int i = 0; is correct Java code, but then you are assuming that NULL and 0 are equivalent for your field. The solution should be that if you want nulls in your numeric data, then you use an java.lang.Integer, and then: Integer i = null; is good code. Hope this helps, Jonathan O'Connor XCOM Dublin Ivens Porto <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 23.10.2003 21:48 Please respond to jboss-user To: [EMAIL PROTECTED] cc: Subject: [JBoss-user] PostgreSQL and NOT NULL integer fields Hi, I'm using JBoss 3.2.2 and PostgreSQL 7.3.4. JBoss is doing something that I can't figure out why. In my CMP beans, JBoss always use the constraint NOT NULL for fields of type integer, even thought I don't set the property in jbosscmp-jdbc.xml for the fields. If the persistent field in the CMP bean is of type int or Integer, JBoss creates the database table with the constraint NOT NULL for integer type fields. Does anyone knows why JBoss does this? -- _/_/_/ _/_/_/_/_/_/ Ivens Porto _/ _/_/_/ OSE - Open Systems Engineering _/ _/_/_/ http://www.ose.com.br _/ _/ _/_/_/ _/_/_/_/ Phone: (55) 34 - 3214-5995 _/ _/_/_/ Fax: (55) 34 - 3214-5994 _/ _/_/_/ _/_/_/_/_/_/ _/_/_/ --- This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] PostgreSQL and NOT NULL integer fields
It works for me. public abstract Integer getIntegerField(); public abstract void setIntegerField(Integer value); public abstract int getIntField(); public abstract void setIntField(int value); 12:30:34,262 DEBUG [Child] Executing SQL: CREATE TABLE CHILD(CHILD_ID BIGINT NOT NULL, name VARCHAR(250) BINARY, integerField INTEGER, intField INTEGER NOT NULL, PARENT_FK BIGINT, CONSTRAINT pk_CHILD PRIMARY KEY (CHILD_ID)) Do you have a testcase? Thanks, alex Ivens Porto wrote: Hi, I'm using JBoss 3.2.2 and PostgreSQL 7.3.4. JBoss is doing something that I can't figure out why. In my CMP beans, JBoss always use the constraint NOT NULL for fields of type integer, even thought I don't set the property in jbosscmp-jdbc.xml for the fields. If the persistent field in the CMP bean is of type int or Integer, JBoss creates the database table with the constraint NOT NULL for integer type fields. Does anyone knows why JBoss does this? --- This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] PostgreSQL and NOT NULL integer fields
- Original Message - From: "Ivens Porto" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 23, 2003 10:48 PM Subject: [JBoss-user] PostgreSQL and NOT NULL integer fields > Hi, > > I'm using JBoss 3.2.2 and PostgreSQL 7.3.4. > > JBoss is doing something that I can't figure out why. > > In my CMP beans, JBoss always use the constraint NOT NULL for fields of > type integer, even thought I don't set the property in > jbosscmp-jdbc.xml for the fields. > > If the persistent field in the CMP bean is of type int or Integer, JBoss > creates the database table with the constraint NOT NULL for integer type > fields. > > Does anyone knows why JBoss does this? Variables of type int, double etc can not have null values, so this is reflected in the database structure. It prevents problems later on. How could this be handled differently to suite everybodies needs? At least this way forces consistency. Joachim --- This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] PostgreSQL and NOT NULL integer fields
Hi, I'm using JBoss 3.2.2 and PostgreSQL 7.3.4. JBoss is doing something that I can't figure out why. In my CMP beans, JBoss always use the constraint NOT NULL for fields of type integer, even thought I don't set the property in jbosscmp-jdbc.xml for the fields. If the persistent field in the CMP bean is of type int or Integer, JBoss creates the database table with the constraint NOT NULL for integer type fields. Does anyone knows why JBoss does this? -- _/_/_/ _/_/_/_/_/_/ Ivens Porto _/ _/_/_/ OSE - Open Systems Engineering _/ _/_/_/ http://www.ose.com.br _/ _/ _/_/_/ _/_/_/_/ Phone: (55) 34 - 3214-5995 _/ _/_/_/ Fax: (55) 34 - 3214-5994 _/ _/_/_/ _/_/_/_/_/_/ _/_/_/ --- This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user