iBatis with MySQL and UTF-8 encoding

2009-03-19 Thread Paweł Gutowski
Hi, I have a problem with writing special characters to database (such as polish letters). Every special character is magically replaced by question-mark char: "?" (HEX: 3F) Reading works correctly: If I'm writing special characters throgh MySQL Query Browser than my application is reading them cor

iBator CommentGenerator: Java Model Class with database column comment

2009-03-19 Thread Benjamin-Klatt
Hi all, I am trying to use the comment I modeled in my database to be automatically used in javadoc comment of the data fields within the java data model source code. I started to implement my own commentGenerator, but the method addFieldComment(Field field, FullyQualifiedTable, String columnNa

Cache does not get flushed on the specified statement execution.

2009-03-19 Thread Jatan Porecha
Hi, I am using iBatis for my database interaction. Lately I am trying to improve performance of some static data fetches by configuring caching. The chache got configured and worked properly however the problem is in flushing of cache data whenever any insert/update/delete happens to that data. I

Re: "Cannot serialize session attribute ..."

2009-03-19 Thread Nicholoz Koka Kiknadze
My first thought is that maybe StandardDaoManager can not be serializable as it deals with database connections. Maybe makes sense to set reference to it transient? On Thu, Mar 19, 2009 at 2:55 PM, Leffingwell, Jonathan R CTR FRCSE, JAX 7.2.2 wrote: > I am running a web app in IBM RAD 7 wit

"Cannot serialize session attribute ..."

2009-03-19 Thread Leffingwell, Jonathan R CTR FRCSE, JAX 7.2.2
I am running a web app in IBM RAD 7 with a Tomcat 5.5.26 server, with clustering (two Tomcat instances). When shutting down the Tomcat server(s), I get the following warning: Mar 19, 2009 2:52:43 PM org.apache.catalina.session.StandardSession writeObject WARNING: Cannot serialize session attribut

Re: Executed SQL log

2009-03-19 Thread Ivan Bojer
You can use this as template then narrow it down to your needs: # Global logging configuration log4j.rootLogger=ERROR, stdout # SqlMap logging configuration... log4j.logger.com.ibatis=DEBUG log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG log4j.logger.com.ibatis.common.jdbc.ScriptRunner=

Re: Executed SQL log

2009-03-19 Thread Alin Popa
Cool, Thanks. On Thu, Mar 19, 2009 at 5:17 PM, Nicholoz Koka Kiknadze wrote: >> >> It's possible to display the executed SQL somehow ? > > Sure, it's possible to log what statements are prepared, what parameters are > set to and what results are retrived. Check the > 'Logging SqlMap Activity' se

Re: Executed SQL log

2009-03-19 Thread Nicholoz Koka Kiknadze
> > > It's possible to display the executed SQL somehow ? Sure, it's possible to log what statements are prepared, what parameters are set to and what results are retrived. Check the 'Logging SqlMap Activity' section in developer guide.

Executed SQL log

2009-03-19 Thread Alin Popa
Hi, It's possible to display the executed SQL somehow ? I know it's about doing the PreparedStatement ... but .. maybe there is an option to set in order to display these. Some workaround also will be helpful. Thanks. -- Best Regards, Alin

Re: mysql default value

2009-03-19 Thread Larry Meadors
On Wed, Mar 18, 2009 at 9:47 PM, Kengkaj Sathianpantarit wrote: > Interesting, thanks. > > However, I think it's a bit ugly. And what about if we want to insert null > value? > You can't: `status` VARCHAR(20) NOT NULL DEFAULT 'ready', But I do agree, it is kind of ugly. ;-) I wonder if

RE: need createCriteria help

2009-03-19 Thread meindert
Sorry, I don't see anything wrong with the way you are using the generated code. And I'm not even going to ask you for the detailed information (to find out what is wrong) because it would quite likely also show yourself what is wrong with the generated code. So my unhelpful answer is; Debug it an

Re: mysql default value

2009-03-19 Thread Alin Popa
Sounds like what I need it, Thanks. 2009/3/18 Iwao AVE! : > Hi Alin, > > How about using or ? > > >  INSERT INTO vjobs ( >  name, status >   >   description >   >  ) VALUES ( >  #name#, #status# >   >   #description# >   >  ) > > > I haven't tested this, but it should work. > > Regards, > Iwao

RE: need createCriteria help

2009-03-19 Thread TarakBhandary
I agreed with your views but here I have something to say, that there is the methods available, which I am using to fetch the records, right. Now I am not getting my results according to the requirement. I have done this according to there document. Now what I am trying to say is the tool is provi

RE: need createCriteria help

2009-03-19 Thread meindert
>Is it the way to fetch the records. It's a universal way to fetch records. The power in ibatis is the control over your queries and the ease of debugging. Hibernate is probably the better tool if you don't want query control or if you want your persistent layer to create the DB > Do u have any ot

RE: need createCriteria help

2009-03-19 Thread TarakBhandary
Thanks for the reply. Do you think that my method is ok? Is it the way to fetch the records. Do u have any other way to fetch the conditional records. meindert-3 wrote: > > Hi tarak, > > It's probably the quickest to debug yourself; > - What is wrong in the result set? > - Did you get log4j wo

RE: need createCriteria help

2009-03-19 Thread meindert
Hi tarak, It's probably the quickest to debug yourself; - What is wrong in the result set? - Did you get log4j working, and do you see the generated query? ==> What is wrong with the generated query? - Put a breakpoint and view the example class and logical check this against the query map in your

Re: need createCriteria help

2009-03-19 Thread TarakBhandary
Look its not possible to post all the pages. I have post the listAll method where I am trying to get the result as the sql query. I will post the source code if it is in one page, but its linked in so many pages. So it is not possible at this moment. Kengkaj Sathianpantarit wrote: > > I haven'

Re: need createCriteria help

2009-03-19 Thread Kengkaj Sathianpantarit
I haven't tried the Example class because I don't have source codes. As you said you did according to the doc, can you post source codes, and XML mapping? Kengkaj On Thu, Mar 19, 2009 at 2:13 PM, TarakBhandary wrote: > > I read the doc but that is not enough for me. Actually I am done according

Re: need createCriteria help

2009-03-19 Thread TarakBhandary
I read the doc but that is not enough for me. Actually I am done according to the doc but still getting my required result. Thats why i need ur help. I dont understand why i am not getting my desire result. Do u ever tried this example class. I mean example.createCriteria()? if yes then tell