tResultsAsXml(){
> StringBuilder result = new StringBuilder("<" + wrapper + ">")
> .append(builder)
> .append("");
> return result.toString();
> }
>
> }
> ===
>
> Larry
>
>
> On 3/
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
http://seeker.dice.com/jobsearch/servlet/JobSearch?op=101&engine=2&dockey=xml/7/4/[EMAIL
PROTECTED]&source=19&FREE_TEXT=keibi
.V
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
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();
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.
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
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.
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
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
http://weblog.raganwald.com/2006/03/fair-and-balanced-look-at-static-vs.html
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
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:
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
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
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
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
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
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
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
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
http://osnews.com/comment.php?news_id=12829
thx,
.V
Your Roomity Broadband Community <http://roomity.com/demo.jsp>
cell: 917 825 3035 in DFW
email: netsql at roomity.com
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
.
__
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
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
39 matches
Mail list logo