Avoid using @@Identity and instead use Scope_Identity().
Here is a blogg that summarises the point:
http://cf-bill.blogspot.com/2005/08/identity-scopeidentity-identcurrent.html
Has links to MSDN for details.
Regards,
A
> -Original Message-
> From: Niels Beekman [mailto:[EMAIL PROTECT
Notwithstanding the OP's issue . is there any sensible way of preventing
this? Ie. how to detect connections are being returned to the pool without
them properly ending transactions?
Is it even possible?
From: Clinton Begin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 06, 2007 6:
Try the latest Microsoft Driver for 2005:
http://msdn2.microsoft.com/en-us/data/aa937724.aspx
See if that helps.
From: Luca Panzetti [mailto:[EMAIL PROTECTED]
Sent: Friday, February 23, 2007 10:50 AM
To: user-java@ibatis.apache.org
Subject: SQLServer problem
Hi All,
I have
Hi Brad,
Have a look at the "WITH" statement (it is ANSI specified) and CTE's (common
table expressions). Here is an example with SQL 2005.
http://msdn2.microsoft.com/en-us/library/ms186243.aspx
I am sure the logic will also work off Oracle versions that support the WITH
statement (may
Larry:
>
> Almost, but not exactly. ;-)
>
> The connection does not remain with the thread for the life of the
> thread, but rather the thread gets the connection from the pool (the
> pool marks it as used so no one else gets it), then uses it, then
> closes it (which just tells the pool that i
From: Larry Meadors [EMAIL PROTECTED]:
>All connectins and transactions are managed using thread local
>storage, so each thread has it's own connection, etc..
(Thanks Larry!)
Ok. Understood. So, each time a new thread that uses SqlMapClientImpl is
spawned, a Connection object is removed
As I understand it, SqlMapClientImpl (SqlMapClient) hides or wraps the primary
JDBC object, Connection. So, we can essentially do everything with
SqlMapClient that we can with JDBC's Connection object (including starting,
commiting or aborting transactions). However, with iBatis, we don't have
Noticed an incorrect case for an XML close tag in iBatis Developer Guide
page 13 (date 9 August 2006) (Maybe's it's been fixed.)
should be
Hi Clinton - thanks for responding.
> SimpleDataSource has served us very well over the years, with very few
> changes. I'd like to redo the interface at some point (currently
> yucky property based config), but the implementation seems to work
> well. It's a synchronous pool that doesn't spawn
Hi folks,
What's the difference between configuring connections as DBCP vs SIMPLE?
When to use which?
TIA,
A
Hi Jeff!
>You can delay parameterClass to runtime already -
> you don't need to specify it at configuration time.
Yes, of course:
queryForList(String id, Object paramObject)
does that already!
(Sorry, my previous message where I gave an example of the API was wrong.
It should ha
... instead of in the sqlmap xml files?
Given this hypothetical sqlmap (without explicit parameterClass and
resultClass):
SELECT [person_id] id
,[person_name] name
,[person_description] description
FROM [TBL_person]
What do you guys think of the opportunity to del
Hi Tegan,
I once made a feature request for something like this:
http://issues.apache.org/jira/browse/IBATIS-206
It didnt receive any serious consideration though, perhaps more on grounds
of ideology than of practicality.
The basis of my request was that if we have the RowHandler f
>From: Clinton Begin [mailto:[EMAIL PROTECTED]
>http://blogs.tedneward.com/2006/06/26/The+Vietnam+Of+Computer+Science.aspx
Thank you very much, I enjoyed that thoroughly. :)
08, 2006 5:13 AM
> To: user-java@ibatis.apache.org
> Subject: Re: Arrays instead of java.util.List?
>
> Abdullah,
> Why do you want to use Arrays[]? Lists are better because they can grow
> and can always be converted into an array.
>
> -Richard
>
> Abdullah Kauch
lf
> Of Larry Meadors
> Sent: Saturday, October 07, 2006 7:12 PM
> To: user-java@ibatis.apache.org
> Subject: Re: Arrays instead of java.util.List?
>
> Nope, but you can do this easy enough:
>
> return (YourType[])queryForList("blah.query", parms).toArray(new
> Y
Abdullah Kauchali:
> I have a complex type as a Java Bean that I'd like to populate using the
> 1:M
> ibatis facility and I cannot serialize a java.util.List - only array of
> objects.
Complex type as in a web services complex type.
Does iBatis support resultsets as arrays or the population of beans that
have array properties instead of java.util.List?
>From the example doc:
Can the property "productList" be an array?
I have a complex type as a Java Bean that I'd like to populate using the 1:M
ibatis facility and I ca
Clinton Begin wrote:
>> I am simply asking for clarification.
And now you have it.
That iBatis is an ORM tool that lacks important ORM features? :) (Just
joking!)
Clinton,
Firstly, please accept my apologies for upsetting you. That was never
my intention. I see you are on
a massi
Abdullah Kauchali wrote:
BTW, I mean offense or disrespect
LOL. I mean *NO* offense or disrespect ...
Sheesh, as if the discussion isn't sensitive already! :-D
Clinton Begin wrote:
>> The fact that it currently translates the resultsets into an object
model
>> As a matter of fact, it could be argued that /that/ part of iBatis
is its /weakness/.
That part? That's not a part...that's ALL iBATIS does. If you've
misunderstood that, then I'm sorry for
Clinton Begin wrote:
>> I think we very badly need support for disconnected "datasets" or
resultsets in iBatis.
Datasets, rowsets, strongly typed or not are generally a horrible
design choice and shouldn't be used in any sort of system that
requires a maintainable object model that can exis
Alan Chandler wrote:
Hang on a sec here, don't we also map Java Classes to database tables
with iBatis? A User class
in my design maps to a User table in the database. Isn't this exactly
how the iBatis docs tell us
we should map our result beans?
Well
a) I was simplifying, but yes we
Clinton Begin wrote:
This is really good discussion. I hope you guys help Kim with the
FAQ, and post your feature requests to JIRA (I think "use iBATIS as a
spreadsheet" is already in there). ;-)
If you mean my JIRA entry, then I agree. But, hey, you started the
"iBatis is a spreadsheet"
Alan Chandler wrote:
http://home.chandlerfamily.org.uk/archive/26/ibatis-v-hiberbate)
In simple terms, Hibernate maps Java Objects to database tables.
iBatis maps Java Objects to SQL statements.
Hang on a sec here, don't we also map Java Classes to database tables
with iBatis? A User cla
Alan Chandler wrote:
Wow - thank you very much. I had long been wondering why I was so attracted
to iBatis rather than Hibernate given that the latter is obviously the way
everyone has been going. Its made a light come on in my head.
Yeah, I like the way Clinton writes about these thin
Clinton Begin wrote:
Try this with Hibernate:
int i = (Integer) client.queryForObject ("countUsersInGroup", "MyGroup");
SELECT Count(1) FROM Users WHERE GroupName = #groupName#
So, we're saying Hibernate has to receive results from all (including ad
hoc) queries to /map/ to Java class
netsql wrote:
Let me try another approach of how I answer this:
Thanks, I appreciate it greatly! :)
SQL is a set processing langage. You select a set, update a set where,
etc., SQL engines are optimised for this for many decades. (See set
theory, unions, intersections, SQL P&T, etc.)
In
Larry Meadors wrote:
Man, this is a big one, and i am late already..i'll get it started.
Sorry. :) I know Friday's almost over, but I need some ammo for
something I am preparing
for next week.
The question is not DAO vs ORM, it is ORM vs Data Mapping.
Got it!
ORM = mapping databas
Fantastic. Some more questions in-line.
Clinton Begin wrote:
ORM
1) Maps classes to tables, and columns to fields.
Don't we do that with iBatis too? Are we saying that mapping classes
to tables, and columns to
fields is generally a bad idea?
2) Must support Object Identity
Yes, of
So, iBatis is /not/ an ORM.
What makes Hibernate an ORM and iBatis not?
or a corollary:
What makes iBatis a DAO implementation and Hiberate not? (Is this a
valid question, to
begin with?)
What are the /decisive/ qualities of each (viz. DAO vs ORM) that
classify them appropriately?
I am lo
Clinton Begin wrote:
Well, as much as I'd like to just tell you how bad of an idea that is,
I'll tell you how to do this... :-)
Thanks. LOL.
My recommendation would be to have two SqlMapClient instancesand
two SqlMapConfig.xml files (one configured for global, one for local).
Switc
(Been out of the loop for a while ... so apologies for stupid question.)
Is it possible to switch the transactional properties from local to global
at runtime?
Are there any good examples I can use?
I am aware that the SqlMapClient, when created, relates to one of the
following transactional ty
Can someone who has experience with the Spring Framework please help me
explain briefly what advantages
it could afford /along with/ the use of Ibatis.
What is it that the Spring offers that IBatis does not?
(I know that Spring is multi-facetted, it does AOP stuff etc - but I am
asking specifi
http://www.mail-archive.com/ibatis-dev@incubator.apache.org/msg00702.html
(Is the wiki a different thing (tm) altogether?)
Larry Meadors wrote:
Can you find a home for that gem on the wiki?
On 8/3/05, *Abdullah Kauchali* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Ok, found an answer from the archives:
I need to sandwitch everything within the dynamic tag with this:
...
This feature definitely needs to be documented.
Cheers
Abdullah
Abdullah Kauchali wrote:
INSERT INTO SEC_DirectoryType (
property
INSERT INTO SEC_DirectoryType (
DirectoryType_Code
DirectoryType_ConnectionFactory
DirectoryType_JavaApiValues
DirectoryType_DotNetApiValues
.
I get incorre
Hi Nilesh,
Quick question on multiple resultsets: does JDBC perform as many
roundtrips to the database as there are outbound resultsets or are the
resultsets brought back in a single roundtrip from the db?
Kind regards
Abdullah
Nilesh Bhattad wrote:
Hi,
Does iBatis support stored proce
What's the best way to obtain resultset metadata from queries executed
through iBatis?
Clinton Begin wrote:
I don't disagree, but I think you're talking about the XML support,
which is a completely different topic. How does this relate to RowSets?
My understanding is that RowSets (& WebRowSets) contain meta-data too.
We require meta-data for /each/ resultset to reach the clie
Clinton Begin wrote:
I'm still not sure why we'd ever support RowSets. The whole point of
iBATIS is to move data between the database and objects. If you're
using a RowSet, you don't have any objects to map to, so what would be
the advantage? I suppose iBATIS still has a simpler API, is tha
Abdullah Kauchali wrote:
2. the possibility of writing your own result maps directly from the
JDBC resultset.
Let me rephrase that:
2. The possibility of /extending/ the standard iBatis array of return
types to wire in a custom one without
needing XSL transformations etc (I hate XSL(tm)). :)
Clinton Begin wrote:
So until then, you can go straight to the download page on good ol'
sourceforge...
Just did that. Thanks! :-D
Clinton, is there a way to see what's still on the to-do list ... do we
vote for things or ... how do the new requirements
system work?
I am particularly in
43 matches
Mail list logo