Re: Setting for removing newlines from SQL?

2008-08-10 Thread Ron Grabowski
I've encountered a couple of times when I've been doing a lot of dynamic sql and would have liked to preserve the newlines in the sql. Makes it easier to understand what the problem is when I copied and pasted the text into a database management program. What about a global setting that defaul

Re: .net functionality for Java

2005-12-17 Thread Ron Grabowski
Someone should make a list. I know the .Net version has an "extends" attribute on nodes that the Java version doesn't have. You can accomplish similiar functionality using and nodes. - Original Message From: Edwin S Lukaweski To: user-java@ibatis.apache.org Sent: Saturday, Dece

Re: [OT] ORMs under the Apache License

2005-12-16 Thread Ron Grabowski
For .Net there is Sooda: http://www.sooda.org/ Its a BSD license. - Original Message From: Ted Husted <[EMAIL PROTECTED]> To: user-java@ibatis.apache.org Sent: Friday, December 16, 2005 12:27:25 PM Subject: [OT] ORMs under the Apache License I think most of us agree that sometimes you

Re: [ERROR] Attribute paramaterClass is not declared for element insert

2005-11-28 Thread Ron Grabowski
parameterClass --- Hendry <[EMAIL PROTECTED]> wrote: > Hi, I got this error when running my application : > > Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error > parsing XML. Cause: > com.ibatis.common.exception.NestedRuntimeException: > Error parsing XPath '/sqlMapConfig/sq

Re: Too many methods on a service object

2005-11-11 Thread Ron Grabowski
of the property. If there are 50 people and each person has 5 addresses with pictures, I shouldn't populate those fields if I'm never going to use them on the list page that just shows first names and street names. The PersonAddress object comes in handy for that... --- Ben Munat <[EMA

Too many methods on a service object

2005-11-11 Thread Ron Grabowski
I've been discussing design patterns (mainly for web sites) with a colleague over the last couple days and my brain is fried with trying to come up with quick answers. Here's some of the things that we've talked about. Hopefully people will share their two cents on these issues... A common pattern

Re: N+1 with column renaming

2005-11-02 Thread Ron Grabowski
+1 That's exactly what I do too. --- Larry Meadors <[EMAIL PROTECTED]> wrote: > I generally name my key fields uniquely, but leave the others what > they are, for example: > > create table Fruit ( > fruitId int, > name varchar(30) > ) > > Then if I join to another table with a "name" fiel

RE: calling trim() on sql map returned strings

2005-10-27 Thread Ron Grabowski
y could you not just put this logic into your POJO. > > example > > public void setThePropertyThatNeedsToBeTrimmed(String property) { > this.property = property.trim(); > } > > > On Oct 26, 2005, at 10:23 AM, Ron Grabowski wrote: > > > Custom type

RE: calling trim() on sql map returned strings

2005-10-26 Thread Ron Grabowski
t that tomorrow- The > sqlmapconfig dtd does have a typehandler child.. > > Cheers > > -Original Message- > From: Ron Grabowski [mailto:[EMAIL PROTECTED] > Sent: 26 October 2005 17:13 > To: user-java@ibatis.apache.org > Subject: RE: calling trim() on sql map retu

RE: calling trim() on sql map returned strings

2005-10-26 Thread Ron Grabowski
IBatisNet has support for replacing the built-in type handlers: TrimStringTypeHandlerCallback could be implemented in such a way that it automatically calls trim() before sending values to the database. You could continue to use the normal #property# syntax without having to specify the ty

Re: Trying to understand selectKey

2005-09-30 Thread Ron Grabowski
The property attribute is valid in IBatisNet. For Java, try keyProperty: SELECT curval('persons_id_seq') Unless I missed something, the iBATIS-SqlMaps-2.pdf file from 5/5/2005 didn't mention keyProperty anywhere. This should also work: Person aPerson = new Person(); aPerson.setFirstname

Re: Quetion about documents

2005-09-28 Thread Ron Grabowski
I personally like the PDF documentation. I think the wiki is good for one off examples or learning about a specific part of iBATIS. The PDF seems to flow together more like a good book. After I'm done reading a section I usually continue reading the next section. After 15min or so I find that I've

Re: Caching; how do I know it's working?

2005-09-26 Thread Ron Grabowski
, its execution time, and its cache hit percentage. --- Michael Campbell <[EMAIL PROTECTED]> wrote: > I would, but I'm a metrics freak. > > > On 9/26/05, Ron Grabowski <[EMAIL PROTECTED]> wrote: > > IBatisNet has a GetDataCacheStats method on the main sqlM

Re: Caching; how do I know it's working?

2005-09-25 Thread Ron Grabowski
IBatisNet has a GetDataCacheStats method on the main sqlMapper object that outputs a simple summary of statements and their cache hit ratio: User.GetMany: 51% User.GetOneById: 20% User.GetManyById: No cache. ... Maybe this is a feature that the Java people would find useful. --- Michael Camp

Re: Dynamic condition/fields

2005-09-20 Thread Ron Grabowski
it is sent to the execution engine. > > > Thanks > > > --- Ron Grabowski <[EMAIL PROTECTED]> wrote: > > > Q1. > > You could pass your parameters in as a Map and use a > > literal: > > > > > > FIELD1 $likeClause$ #attribute1# > >

Re: Dynamic condition/fields

2005-09-20 Thread Ron Grabowski
Q1. You could pass your parameters in as a Map and use a literal: FIELD1 $likeClause$ #attribute1# Q2. You could use a literal for this as well. Remember that ibatis isn't a sql parser, it doesn't know anything about your column names. It sees everything as text so there's nothing like thi

Re: Define Constants in SQLMap

2005-09-14 Thread Ron Grabowski
If you define a global property, you should be able to do something like this: You could place the additional values into a Map along with the object and pass that into the statement: map.put("truckOrderType", getTruckOrderTypeValue()); map.put("orderType", getOrderType()); --- Prashant

Re: defaultMap: reuse "resultMap" for std CRUD

2005-09-13 Thread Ron Grabowski
; Larry > > On 9/13/05, Ron Grabowski <[EMAIL PROTECTED]> wrote: > > The .Net port of ibatis supports a generate tag: > > > > > > > > > > > > That will automatically generate a generic: > > > > UPDATE Categories SET... > &g

Re: defaultMap: reuse "resultMap" for std CRUD

2005-09-13 Thread Ron Grabowski
The .Net port of ibatis supports a generate tag: That will automatically generate a generic: UPDATE Categories SET... sql statement. I believe it also supports generating DELETE and SELECT statements. Perhaps you can look into porting this code to the Java version. --- Joachim Hoffman

Re: Vendor specific queries?

2005-09-06 Thread Ron Grabowski
You could create different property files per each vendor that contain database specific things (like the select key statement, GETDATE() , etc.) and use it this way: ${SELECT_KEY} Some people use this property syntax to group database specific sql maps: A colleague of mine suggeste

Re: [SOLVED]Re: [HELP] [HELP ]Problem Oscache + Ibatis

2005-08-03 Thread Ron Grabowski
I discovered the IBatisNet is the same way IBATISNET-87 :( One of the contributing factors may be that there isn't an easy way to check if the same row handler has been passed in on subsequent calls to QueryWithRowsHandler. If the same parameters and row handler has been passed in, then the value

Re: Embedding ResultMaps

2005-08-03 Thread Ron Grabowski
It should be possible to reference a resultMap in another file if you use the complete namespace. Have you tried that? --- [EMAIL PROTECTED] wrote: > > Is there a way to embed result maps within parent result maps? The > reason I > ask is that I have found that for large projects, SqlMaps can be

Re: Is there a way to validate parameterClass and resultClass for each ibatis query before runtime?

2005-07-22 Thread Ron Grabowski
unds like this is strictly to determine if the XML is > well-formed and valid. The trick is determining if the XML matches > the > DB schema, which is a far more difficult (infinitely more difficult?) > problem. > > -ed > > On 7/22/05, Ron Grabowski <[EMAIL PROTECTED]&g

Re: Is there a way to validate parameterClass and resultClass for each ibatis query before runtime?

2005-07-22 Thread Ron Grabowski
In the 1.x releases, there was a XmlSqlMapValidator class that could validate the maps at compile time: ibatis_db_guide-1-2-9.pdf " Validation While your developing your application, it is probably quite inconvenient to start up your app server just to test your SQL Maps. For this reason, a separ

Re: iBatis book

2005-07-22 Thread Ron Grabowski
I think a more conventional approach will be taken (i.e. you'll be able to order it on Amazon or buy it in a book store). A lot of book publishers offer discounts if you download the book in PDF format from them. Hibernate in action is $44 from Manning and $22 in PDF. --- netsql <[EMAIL PROTECTED]

Re: n+1 is triggering multiple queries, 3?

2005-07-14 Thread Ron Grabowski
The Java version of iBATIS has support for logging all sql sent to the database. Here's some sample output: http://issues.apache.org/jira/browse/IBATISNET-35 --- Kris Rasmussen <[EMAIL PROTECTED]> wrote: > Thanks Clinton, > > I will look into this myself when I have more time. I wish there we

Re: Getting UncategorizedSQLException

2005-07-13 Thread Ron Grabowski
Does it work if you change the first result node to: or --- "Rao, Satish" <[EMAIL PROTECTED]> wrote: > > I get an UncategorizedSQLException when I execute the > 'listRunDetails' > select statement shown below. The query is a join between two tables. > Am > I doing something wrong here? >

Re: I must restart Tomcat when I modify some SQL Map XML files in SQLMapConfig.xml

2005-07-12 Thread Ron Grabowski
I remember experiencing a similiar problem with Eclipse and Tomcat. It seemed that whenever I deployed, Tomcat wouldn't recognize that files had changed and it would never reload the application. I recall being frustrated when I made small changes to sqlMap xml files and I had to completely shutdow

Re: I guess one can not parameterize the table name

2005-06-28 Thread Ron Grabowski
select * from $value$ where TheStatus = 'ACTIVE' and type = COLOR --- Folashade Adeyosoye <[EMAIL PROTECTED]> wrote: > Such as > > > > select * from #value# where TheStatus = 'ACTIVE' and type = COLOR > > > > > > shardayyy > > > > > >

Re: lock

2005-06-24 Thread Ron Grabowski
I've never tried creating tables and views using that syntax but it should work. --- Henry Lu <[EMAIL PROTECTED]> wrote: > It worked. Thanks for your help. Based upon your experience, do you > know > if this works for "create table" and "Create view&quo

RE: table with export and sorting

2005-06-24 Thread Ron Grabowski
I've used Tiles, Struts, and DisplayTag at the same time before. Its possible to export a DisplayTag table when using Tiles and Struts. You need to add a node to the web.xml file: http://tinyurl.com/3aadr http://displaytag.sourceforge.net/apidocs/org/displaytag/filter/ResponseOverrideFilter.html

Re: lock

2005-06-24 Thread Ron Grabowski
last example is of type SqlMapClient and can be found in the com.ibatis.sqlmap.client package. - Ron --- Henry Lu <[EMAIL PROTECTED]> wrote: > What is the class of > > sqlMapper > > ? > > -Henry > > > > Ron Grabowski wrote: > > >Have you tried

Re: lock

2005-06-23 Thread Ron Grabowski
Have you tried Larry's suggestion? sqlMapper.executeUpdate("lockTable"); lock table x in shared mode --- Henry Lu <[EMAIL PROTECTED]> wrote: > Mr. Ruth, thank you very much for your info for me to understanding > this > group. I thought there is a group of expertise watching the emails

Re: OT: COUNT query speed issue

2005-06-16 Thread Ron Grabowski
Do things get faster if you have the database index remote_id and log_time? --- Zoran Avtarovski <[EMAIL PROTECTED]> wrote: > I have a quick query regarding the speed of count query I use to > generate a > chart, which is too slow at present and I'm looking for suggestions > to speed > it up. >

Re: Possibilities and/or impossibilities of subclassing

2005-06-15 Thread Ron Grabowski
The next message in the thread had a list of three cases where the discriminator might come in handy: * table per class hierarchy * table per subclass * table per concrete class That's the answer I was looking for. I believe both the .Net and Java version now have the same level of suppor for