Re: ibatis to return xml instead of arraylist (of hashmap).

2007-03-16 Thread netsql
tResultsAsXml(){ > StringBuilder result = new StringBuilder("<" + wrapper + ">") > .append(builder) > .append(""); > return result.toString(); > } > > } > === > > Larry > > > On 3/

ibatis to return xml instead of arraylist (of hashmap).

2007-03-15 Thread netsql
In the past I allways returned arraylist of hashmap and that works EXCLENT. I now want to return xml. I saw some notes on xstream and it works but not so well, I do not like the xml it makes. Is there snipets or more ideas to help me? tia, .V

help wanted: sql + java full time w/ ibatis

2006-11-21 Thread netsql
http://seeker.dice.com/jobsearch/servlet/JobSearch?op=101&engine=2&dockey=xml/7/4/[EMAIL PROTECTED]&source=19&FREE_TEXT=keibi .V

Re: faster updates

2006-05-11 Thread netsql
Also, I wonder if iBatis is smart enough to create statments for each type of a statment if there are mutiple? or should I have 2 sqlmaps for 2 statments? .V Diran Ayandele wrote: Or, you could even leave batch size to your dao: sqlMap.startBatch(); return sqlMap.exec

Re: faster updates

2006-05-11 Thread netsql
So that is a good question: startTransaction or startBatch or both? Which 1st? Which is faster? tia, .V netsql wrote: Diran Ayandele wrote: Or, you could even leave batch size to your dao: sqlMap.startBatch(); return sqlMap.executeBatch();

Re: faster updates

2006-05-11 Thread netsql
n On May 10, 2006, at 3:50 PM, netsql wrote: How do you batch update multiples if I discreatley call each update? Do begin trn/end tarn on a timer? .V Nathan Maves wrote: I would suggest trying a batch insert/update first.

Re: faster updates

2006-05-10 Thread netsql
So reading last paragraph of sql map on page 32 docs. I wrap the sql map in static methods anyway so that would mean that if that sql map has only one statement, it could Q up all updates, and then ever 3 secods restart the transaction. It seems to make sense. .V netsql wrote: Do

Re: faster updates

2006-05-10 Thread netsql
How do you batch update multiples if I discreatley call each update? Do begin trn/end tarn on a timer? .V Nathan Maves wrote: I would suggest trying a batch insert/update first.

faster updates

2006-05-10 Thread netsql
So I have this application that does this one update millions of times. Is there a way to hook up ibatis to do prepared statements? ('cuase it be slower otherwise). tia, .V ps: if not then I would write a thread that accepts the update requests to a Q, and keeps an open prepared statement tha

Re: HashMap results and column aliased with '.' in the name.

2006-03-17 Thread netsql
You can remap in sql w/ "as" or map the fields in XML. .V Daniel Pitts wrote: I want to get a result back as a HashMap with all the columns in the result being keys in the map. It makes sense for my application to have '.'s in the column names, but ibatis is trying to map those to properties o

ot : strong vs dynamic casting

2006-03-16 Thread netsql
http://weblog.raganwald.com/2006/03/fair-and-balanced-look-at-static-vs.html

Re: Optimistic locking question

2006-03-15 Thread netsql
Sybase has timestamp just for that. .V [EMAIL PROTECTED] wrote: I would agree that this would be an easy implementation that I would prefer. The problem is that I am working with an existing Data Model that I inherited and I cannot change without having an enormous impact on multiple groups

Re: How to make dao's / vo's more polymorphic

2006-03-15 Thread netsql
No, you do not have to. But sometimes you have to remap (in the map) the keys from form to db. That would be extreme, my point was only that VO could and in my case should be collections. I mostly work w/ jTable and DataSource now, which work via "reflection" (for each) .V Joe Wolf wrote:

Re: How to make dao's / vo's more polymorphic

2006-03-14 Thread netsql
If you use Struts, it supports maps instead of beans, so no need. If you use DisplayTag, it takes a collection. So does DataSource in c#, Flash, and jTable. So ... there is no such thing (giant interface of string constants of keys) is my case. It takes the Collection (arraylist of hashmaps) and

Re: How to make dao's / vo's more polymorphic

2006-03-14 Thread netsql
Using Collections for VO makes them *reusable*, which is what OO's only goal, to make you more productive via reuse. They are dynamic VO in the sense that one cad add a column in SQL or in view from version 1.0 of your web app to 2.0, and you can do so w/o any code changes in the VO. Sorry that

Re: How to make dao's / vo's more polymorphic

2006-03-14 Thread netsql
I used to think that, and wrote a still up to date book covering OO, iBatis and beans, etc., free here : http://wiki.apache.org/struts/StrutsBookhttp://wiki.apache.org/struts/StrutsBook But since I have seen and used dynamic langs, and trying to bring some of the benefits to the still strongly

Re: How to make dao's / vo's more polymorphic

2006-03-13 Thread netsql
h all other best practices as well. Cheers, ;-) Clinton On 3/13/06, *netsql* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: You can do that and more including losly coupled by using a HashMap as return type (return ArrayList of Maps from iBatis ) like I do. No more

Re: How to make dao's / vo's more polymorphic

2006-03-13 Thread netsql
You can do that and more including losly coupled by using a HashMap as return type (return ArrayList of Maps from iBatis ) like I do. No more out of sync beans. .V Paul Carr wrote: Ideally I'd like all my DAO interfaces to extend a BaseDAO and all my value

Re: Urgent help required

2006-03-12 Thread netsql
Most likely for "muti-insert" you want to use prepared statement (inside a transaction), and I do so in Groovy (instead of iBatis, I use ibatis for OLTP, Groovy for batch. Q: I wonder if people know why prepared statement exists even. A: It's 1,000 times faster). .V Sven Boden wrote: So inse

Re: OT: Left Join Question

2005-12-14 Thread netsql
That is just a simple outer join, then. "*=" Don't work in iBatis, work in a sql query tool and hard code values until you get what you want. Also long term, "SQL for Smarties" (as opposed to Dummies) is a good book. .V Zoran Avtarovski wrote: What I need is to retrieve a left join of a

Re: OT: Left Join Question

2005-12-14 Thread netsql
I now have the need to store multiple list types in the list_item table where x in (a, b, c) and have to add a list_type column to the list_item table. select union select .V

another ibatis article

2005-12-01 Thread netsql
http://osnews.com/comment.php?news_id=12829

Re: [VOTE] Discontinue Support for: iBATIS Java 1.x, JDK 1.3 and DTDs at ibatis.com

2005-11-07 Thread netsql
thx, .V Your Roomity Broadband Community <http://roomity.com/demo.jsp> cell: 917 825 3035 in DFW email: netsql at roomity.com

Re: iBatis and ORM's

2005-11-07 Thread netsql
of system that requires a maintainable object model that can exist with or without a database. -- thx, .V Your Roomity Broadband Community <http://roomity.com/demo.jsp> cell: 917 825 3035 in DFW email: netsql at roomity.com

Re: [VOTE] Discontinue Support for: iBATIS Java 1.x, JDK 1.3 and DTDs at ibatis.com

2005-11-06 Thread netsql
. __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com -- thx, .V Your Roomity Broadband Community <http://roomity.com/demo.jsp> cell: 917 825 3035 in DFW email: netsql at roomity.com

Re: iBatis and ORM's

2005-11-05 Thread netsql
s /intentions/ of answering the fundamental questions that all ORM's have ambitions of solving - the primary one being the ability to give the programmer a /natural/ (cough!) feel for their objects. -- thx, .V Your Roomity Broadband Community <http://roomity.com/demo.jsp> cell: 917 825 3035 in DFW email: netsql at roomity.com

Re: iBatis and ORM's

2005-11-04 Thread netsql
tive Optimization from the SQL engine is leveraged. SQL mapping is not aware of rows, it's aware of a set of results that may be cached should somone else required identical result set. hth -- thx, .V Your Roomity Broadband Community <http://roomity.com/demo.jsp> cell: 917 825 3035 in DF

[OT ANN] Roomity v 1.5 w/ video, social networking and html editor + JDNC article

2005-11-04 Thread netsql
Roomity.com v 1.5 is a web 2.01/RiA poster child community webapp. This new version ads broadcast video, social networking such as favorite authors and html editor.It likely already has groups and content you are already using but aggregated and safer, including technology, Java, etc., but it only

Re:increase performance

2005-09-02 Thread netsql
iBatis will not return the results faster than DB.Do a showplan on your querry, or have a senior developer that knows SQL look at the querry.It looks like somone went out of the way to force a tablescan and sort of 5 million records..V

Re: SQLMaps - Sybase and stored procedures

2005-08-09 Thread netsql
I make that mistake every few months. It should throw exception and fail at dtd. ;-) .V Larry Meadors wrote: It's true: Without a resultMap or resultClass, your results will be silently discarded. Larry

Re: Slow query update...

2005-07-29 Thread netsql
Oh and... what JDBC driver are you using? ;-) Try sf.net for sybase. .V Greg Day wrote: Hi Daniel and Netsql, i've had no problems with ibatis previously, but the essential thing is: running in ibatis=table scan, outside=not. I am guessing theres something stuffed with my dat

Re: Slow query update...

2005-07-27 Thread netsql
I wonder if "prepared" statment is somhow hiting to the optimizer that this has been optimized allready and that it has a querry plan. It would take few lines of code to reproduce w/ JDBC code prepared statment and not. .V Greg Day wrote: Hi Daniel and Netsql, Thanks for the repl

Re: Slow query update...

2005-07-27 Thread netsql
You can allways do a stored proc and force a plan. The querry optimizer should see the querry the same way. .V Greg Day wrote: Hi all regarding my ultra-slow query when running through ibatis.. just to recap, if I run a sybase query through Ibatis (inside jboss), it goes really slow, if I run

iBatis book

2005-07-22 Thread netsql
Somone said there are no books on ibatis. This is what I think: Take the pdf, and put it on one of the microtransaction books sites where people can pay for it (those that like to pay for it or just want to donate). The money can go to Apache or whaterver. I can do this, if blesed by developer

Re: synchronization between DB and ibatis sqlmaps

2005-07-20 Thread netsql
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 test

[FRIDAY OT ANN] My new project is beta

2005-07-15 Thread netsql
roomity.com to check it out. it should help you use mail lists. It's RiA/JDNC (it uses iBatis :-)). There should be updates weekly and it should release in days. hope you like. .V

Re: Advantage of Map over Bean as a parameterObject?

2005-07-03 Thread netsql
1) You don't have to write a JavaBean class. ;-) 2nd one: 2)You don't have to change or maintain it. As project evolves and front end and back end evolve... there is no maitanance or CRUFT or duplication. I used to do beans for many years. Then I started w/ Groovy, CoR, C#, Flash, etc.

Re: Am I doing anything wrong? iBATIS has very poor performance on batch inserts compared to JDBC.

2005-06-17 Thread netsql
Clinton Begin wrote: Hey Vic, >>When doing large inserts in loops; for performance it's best to have the >>commint/rollback and start batch outside of the loop? Yes, absolutely. Not only for performance, but otherwise it wouldn't be "a" transaction would it? :-) THX! .V

Re: Am I doing anything wrong? iBATIS has very poor performance on batch inserts compared to JDBC.

2005-06-17 Thread netsql
So for us SQL newbies, if we can put up w/ a bit more: When doing large inserts in loops; for performance it's best to have the commint/rollback and start batch outside of the loop? Do we have to have transactions of can we just use start/execute batch? (and what if I want the insert to comm