|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Problem in running TriggerHi,
I am using HSQLDB for JUNIT test coverage of my project. The problem i am facing is, We have our main database is in MSSQL, where in each and every table we are having default date field. Means as we insert any row MSSQL fill the date coloumn. So for that date field in our hibernate mapping file we are having property insert/update = false. Now for junit test these mapping files are creating tables. and using these mapping files only we insert data. but here i am getting problem since for date field property is insert/update = false in mapping files. so i am not able set date and getting error cannot insert null in non - nullable coulmn. is there any other way in HSQLDB to resolve this issue. Thanks in Advance Vishwa |
|
|
Re: Problem in running TriggerIn the CREATE TABLE statement set a default for the date column, for example
DATECOL DATE DEFAULT CURRENT_DATE Alternatively, you can add the DEFAULT clause after the table has been created. See the Guide for syntax. Fred ----- Original Message ----- From: "Vishwadeep" <vishu.sunny@...> To: <hsqldb-user@...> Sent: 14 July 2008 12:02 Subject: [Hsqldb-user] Problem in running Trigger Hi, I am using HSQLDB for JUNIT test coverage of my project. The problem i am facing is, We have our main database is in MSSQL, where in each and every table we are having default date field. Means as we insert any row MSSQL fill the date coloumn. So for that date field in our hibernate mapping file we are having property insert/update = false. Now for junit test these mapping files are creating tables. and using these mapping files only we insert data. but here i am getting problem since for date field property is insert/update = false in mapping files. so i am not able set date and getting error cannot insert null in non - nullable coulmn. is there any other way in HSQLDB to resolve this issue. Thanks in Advance Vishwa -- View this message in context: http://www.nabble.com/Problem-in-running-Trigger-tp18440033p18440033.html Sent from the HSQLDB - User mailing list archive at Nabble.com. ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Hsqldb-user mailing list Hsqldb-user@... https://lists.sourceforge.net/lists/listinfo/hsqldb-user ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Hsqldb-user mailing list Hsqldb-user@... https://lists.sourceforge.net/lists/listinfo/hsqldb-user |
|
|
Re: Problem in running TriggerI think he wants to have Hibernate create the table automatically,
Fred. I'm pretty sure that I have had Hibernate create HSQLDB auto-populate tables like this, but I don't have time to search through my apps for it. fredt wrote: > In the CREATE TABLE statement set a default for the date column, for example > DATECOL DATE DEFAULT CURRENT_DATE > > Alternatively, you can add the DEFAULT clause after the table has been > created. See the Guide for syntax. > > Fred > ----- Original Message ----- > From: "Vishwadeep" <vishu.sunny@...> > To: <hsqldb-user@...> > Sent: 14 July 2008 12:02 > Subject: [Hsqldb-user] Problem in running Trigger > > > > Hi, > > I am using HSQLDB for JUNIT test coverage of my project. > The problem i am facing is, > > We have our main database is in MSSQL, where in each and every table we are > having default date field. > Means as we insert any row MSSQL fill the date coloumn. > > So for that date field in our hibernate mapping file we are having property > insert/update = false. > > Now for junit test these mapping files are creating tables. and using these > mapping files only we insert data. > > but here i am getting problem since for date field property is insert/update > = false in mapping files. > > so i am not able set date and getting error cannot insert null in non - > nullable coulmn. > > is there any other way in HSQLDB to resolve this issue. > > Thanks in Advance > Vishwa ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Hsqldb-user mailing list Hsqldb-user@... https://lists.sourceforge.net/lists/listinfo/hsqldb-user |
|
|
Re: Problem in running TriggerThanks guys,
Your Suggestion worked for me.
|
| Free Forum Powered by Nabble | Forum Help |