Wow - thanks for the replies.
I had not thought of the Transaction feature. In the service
object there is a statement to set = true or false but none of the
books I have seen mention that I can turn it off or on anywhere else.
(in my test_case for example).
Question: If the transaction rolls back the events of the
test_case,
then why does the DB not decrement the record ID in the table as
well?
Without any other changes, if I run the test_case a second time the
statement
def dbNum = myServ.ident()
is assigned a value of "16". And it continues incrementing until I
"drop table; create table; Insert Into..." to reinstantiate the DB.
Only then does the test_case return to the Record_ID of 15
(next after the initial 14 records I insert).
Because I am learning Grails, I want to prove to myself the DB is
actually
updating for the new record. So....
1. I will try *** def transactional = false *** in setUp() or in my
testCase() methods
to see if it works.
2. I might try a retrieve_all_records after the save() just to see if
it
returns 15 records.
3. Does anyone know where in the Grails Source the transaction/
rollback instructions
reside so I can see it?
Thanks,
Steph T
> > ********************************************************************************************************************
> > > myServ.save(flush:true) // flush to get it to commit to
> > the db
> > > def dbNum = myServ.ident() // ident returns the DB record #
> > for newly
> > > saved record
> > > def dbServ = Servicer.get(dbNum) // fetch the last record stored to
> > > a new object.
>
> > > assertEquals ( perform string compares between MyServ and dbServ )
> > > // these all SUCCEED
>
> > ********************************************************************************************************************
> hamlet...@gmail.com- Hide quoted text -
>
> - Show quoted text -