You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Darek Dober <do...@op.pl> on 2005/07/20 14:02:47 UTC
synchronization between DB and ibatis sqlmaps
Do you have any solutions for that?
Let's assume, that something changed in database, i.e names of tables or
columns. And you forgot to change it.
As far as I know I cannot check if sqlmap command is still valid, unless i
execute it. It is difficult to execute and check all of the sqlmaps. Bean
properties
are checked at creation of ibatis instance so you get an error, but what if
something changed in database?
One of the way is to write test case, which should test all of the sqlmaps
against any changes.
Is the simplier way to check correctness of all sqlmaps
Darek Dober
Re: synchronization between DB and ibatis sqlmaps
Posted by Ed Griebel <ed...@gmail.com>.
You could try httpunit which runs unit tests against your web server,
which would implicitly check your database mappings. And it would have
the side-effect of testing your web app too.
-ed
On 7/20/05, Darek Dober <do...@op.pl> wrote:
>
> Because of laziness:)
> Writting test cases takes some time.
>
> I'm developing application using Tomcat, and I start to realize, that
> testing on real application takes to much time, including deploying, logging
> on, and so on.
>
> At the beginning it seemed to be a good choice, but it isn't. I have the
> problem with refreshing sqlmap files by tomcat (it was mentioned on this
> group, but doesn't work for me), so I have to deploy and reload application.
> Even using ant to reloadTask and than logon is a little slow. So test case
> seems to be the fastest way.
>
> What is your advice.
> Is building test cases the best practise and fastest of doing this?
>
> Darek
>
>
>
>
> ----- Original Message -----
> From: Clinton Begin
> To: user-java@ibatis.apache.org
> Sent: Wednesday, July 20, 2005 4:06 PM
> Subject: Re: synchronization between DB and ibatis sqlmaps
>
>
> Why wouldn't you have test cases to test your statements anyway?
>
> Cheers,
> Clinton
>
>
> On 7/20/05, Darek Dober <do...@op.pl> wrote:
> > Do you have any solutions for that?
> >
> > Let's assume, that something changed in database, i.e names of tables or
> > columns. And you forgot to change it.
> >
> > As far as I know I cannot check if sqlmap command is still valid, unless i
> > execute it. It is difficult to execute and check all of the sqlmaps. Bean
> > properties
> > are checked at creation of ibatis instance so you get an error, but what
> if
> > something changed in database?
> >
> > One of the way is to write test case, which should test all of the sqlmaps
> > against any changes.
> >
> > Is the simplier way to check correctness of all sqlmaps
> >
> > Darek Dober
> >
> >
>
>
Re: synchronization between DB and ibatis sqlmaps
Posted by Larry Meadors <la...@gmail.com>.
OK, I am going to mark this day on my calendar in bright orange ink.
Wednesday July 25th, 2005: The day Vic and Larry agreed.
;-D
Larry
On 7/20/05, netsql <ne...@roomity.com> wrote:
> Darek Dober wrote:
> > Because of laziness:)
> > Writting test cases takes some time.
> >
>
> Most of us feel that unit testing it the lazies thing to do.
>
> >
> > What is your advice.
> > Is building test cases the best practise and fastest of doing this?
> >
> > Darek
> >
>
> YES!
> Unless you like random debuging.
>
> unit testing increases productivity!
> you should unit test only if you are lazy or in a rush.
>
> Otherwise, if you bill by the hour.... don't unit test.
> .V
>
>
Re: synchronization between DB and ibatis sqlmaps
Posted by netsql <ne...@roomity.com>.
Darek Dober wrote:
> Because of laziness:)
> Writting test cases takes some time.
>
Most of us feel that unit testing it the lazies thing to do.
>
> What is your advice.
> Is building test cases the best practise and fastest of doing this?
>
> Darek
>
YES!
Unless you like random debuging.
unit testing increases productivity!
you should unit test only if you are lazy or in a rush.
Otherwise, if you bill by the hour.... don't unit test.
.V
Re: synchronization between DB and ibatis sqlmaps
Posted by Darek Dober <do...@op.pl>.
Because of laziness:)
Writting test cases takes some time.
I'm developing application using Tomcat, and I start to realize, that testing on real application takes to much time, including deploying, logging on, and so on.
At the beginning it seemed to be a good choice, but it isn't. I have the problem with refreshing sqlmap files by tomcat (it was mentioned on this group, but doesn't work for me), so I have to deploy and reload application. Even using ant to reloadTask and than logon is a little slow. So test case seems to be the fastest way.
What is your advice.
Is building test cases the best practise and fastest of doing this?
Darek
----- Original Message -----
From: Clinton Begin
To: user-java@ibatis.apache.org
Sent: Wednesday, July 20, 2005 4:06 PM
Subject: Re: synchronization between DB and ibatis sqlmaps
Why wouldn't you have test cases to test your statements anyway?
Cheers,
Clinton
On 7/20/05, Darek Dober <do...@op.pl> wrote:
Do you have any solutions for that?
Let's assume, that something changed in database, i.e names of tables or
columns. And you forgot to change it.
As far as I know I cannot check if sqlmap command is still valid, unless i
execute it. It is difficult to execute and check all of the sqlmaps. Bean
properties
are checked at creation of ibatis instance so you get an error, but what if
something changed in database?
One of the way is to write test case, which should test all of the sqlmaps
against any changes.
Is the simplier way to check correctness of all sqlmaps
Darek Dober
Re: synchronization between DB and ibatis sqlmaps
Posted by Clinton Begin <cl...@gmail.com>.
Why wouldn't you have test cases to test your statements anyway?
Cheers,
Clinton
On 7/20/05, Darek Dober <do...@op.pl> wrote:
>
> Do you have any solutions for that?
>
> Let's assume, that something changed in database, i.e names of tables or
> columns. And you forgot to change it.
>
> As far as I know I cannot check if sqlmap command is still valid, unless i
> execute it. It is difficult to execute and check all of the sqlmaps. Bean
> properties
> are checked at creation of ibatis instance so you get an error, but what
> if
> something changed in database?
>
> One of the way is to write test case, which should test all of the sqlmaps
> against any changes.
>
> Is the simplier way to check correctness of all sqlmaps
>
> Darek Dober
>
>