Hello Everyone,
Can anyone tell me what exactly does sqlmapclient.insert method return I know
it returns an object but does it returns the object of selectkey means say in
following example
SELECT currval('MSCPerfCntrTrunk_seq')
Does it return an Integer Object containing an sequen
Did you run it to see?
Larry
On Wed, Feb 11, 2009 at 7:33 PM, Vorius wrote:
> I am referring to programmatically altering the sql maps (specifically,
> adding entirely new select statements) once the applciation has already
> started.
I believe that Clinton did some stuff to make that possible with
ibatis2 (it's definitely d
Hi Larry,
No I haven't run it , the problem is I haven't got a test bed to run it and I
am running short on time to actually create one. I know I am asking for baked
cake but seriously I have no option as of now that's why I posted on forum
otherwise I would not have done so.
I would be glad
Please help me
-Original Message-
From: Rahul Saluja [mailto:rahul.sal...@vnl.in]
Sent: Thursday, February 12, 2009 9:17 PM
To: user-java@ibatis.apache.org; larry.mead...@gmail.com
Subject: RE: What does Insert method return
Hi Larry,
No I haven't run it , the p
Hi Rahul
check this website out
http://ibatis.apache.org/docs/java/user/com/ibatis/sqlmap/client/SqlMapClient.html
.
It seems to say that it will return the number of rows inserted.
Though I understand you have no test bed but I would still suggest you some
how test it with a rollback enabled and
>From
>http://ibatis.apache.org/docs/java/user/com/ibatis/sqlmap/client/SqlMapClient.html.
"Executes a mapped SQL INSERT statement. Insert is a bit different
from other update methods, as it provides facilities for returning the
primary key of the newly inserted row (rather than the effected rows
Hi Sundar and Larry,
Really appreciate you taking out time and replying but my question still stands
unanswered .
My question is the select key returns the generated sequence number in case of
insert (that I know) ,so if I use the parameters class field as value to
keyProperty attribute will t
Hello everybody,
Can anyone tell me in simple words what is the purpose of Keyproperty attribute
in selectkey tag.
Looking forward to your response.
Regards
Rahul Saluja
The information contained in this e-mail is private & confidential and may also
be legally privileged. If you are not the
And one more thing is this is a optional attribute.
Regards
Rahul Saluja
From: Rahul Saluja [mailto:rahul.sal...@vnl.in]
Sent: Thursday, February 12, 2009 10:13 PM
To: user-java@ibatis.apache.org
Subject: KeyProperty attribute in Selectkey Tag
Importance: High
He
This the name of the attribute you can use in your INSERT command to
specify the primary key.
-Kevin
-Original Message-
From: Rahul Saluja [mailto:rahul.sal...@vnl.in]
Sent: February 12, 2009 11:43 AM
To: user-java@ibatis.apache.org
Subject: KeyP
Hey Burke,
So does this mean if I simply say
SELECT currval('MSCPerfCntrTrunk_seq')
While doing insert in my java code in following manner
Long generatedSeq = (Long)Sqlmapclient.insert("stringiD" , class);
Will this return me generated sequence back to my java code.
Regards
Rahul
Does anybody care to reply.
Please.
From: Rahul Saluja [mailto:rahul.sal...@vnl.in]
Sent: Thursday, February 12, 2009 10:22 PM
To: user-java@ibatis.apache.org
Subject: RE: KeyProperty attribute in Selectkey Tag
Hey Burke,
So does this mean if I simply say
Hey Rahul,
PPL are volunteering to reply, They arent obliged to u in
any way. You gotto be patient if u need reply. Please do watch what you say
please
-Sundar
On Thu, Feb 12, 2009 at 10:00 AM, Rahul Saluja wrote:
>
>
> Does anybody care to reply.
>
>
>
>
>
> Please.
> -
Hello Everybody,
My apologise if I have hurted anyone in any manner.
Regards
Rahul Saluja
From: Sundar Sankar [mailto:fatboys...@gmail.com]
Sent: Thursday, February 12, 2009 10:38 PM
To: user-java@ibatis.apache.org
Subject: Re: KeyProperty attribute in Selectkey T
Or...you know, maybe *try it* while you wait. :-)
Larry
On Thu, Feb 12, 2009 at 10:08 AM, Sundar Sankar wrote:
> PPL are volunteering to reply, They arent obliged to u in
> any way. You gotto be patient if u need reply. Please do watch what you say
> please
>
Rahul,
My experience with this tag is you use it to define a query to determine
your primary key, in the absence of, say an IDENTITY column.
You need to specify the keyProperty attribute if you want the following
SQL to be able to utilize the result of the query. In the following
example, I ut
I believe that your parameterMap (or parameterClass) object as defined
in the parameterClass attribute of the statement in your sqlMap
file, will have the attribute that matched the keyProperty set, so when
the insert() method returns, in your example below, newRecord will have
the matching attrib
Hey Bruke,
Well I do have sequences defined for my each table which acts as a primary key
for my table now I want to use this generatedkey as a foreign key in another
table so now if I use my class attribute to have this sequence id , then how
can I get that key in java code , I am assuming I c
Hey Bruke,
Well I do have sequences defined for my each table which acts as a primary key
for my table now I want to use this generatedkey as a foreign key in another
table so now if I use my class attribute to have this sequence id , then how
can I get that key in java code , I am assuming I c
It does not return an object, rather your code passes
MSCPerfCntrTrunkTblImpl by reference to the insert() method. This
method invokes the setter for the field that matches the keyProperty
name (likely by reflection) and sets the field directly. So, when you
return from the insert() method, your o
Dude...seriously...*try it*.
The insert statement always returns the value of the select key, or
null if there is no select key. In the example above, the return
value is Integer. The keyProperty attribute is there for just this
instance - where you get the new key from a sequence before inserti
Larry,
This is what I initially suspected as well. I had already downloaded a
java SQL client to test it out when you responded. Oddly enough, it does
not duplicate the behavior we experienced via iBatis. The query
executes correctly and only deletes the rows defined in the WHERE
clause.
Hmmm..
Hey Kevin,
Sorry for addressing you by your sur name earlier , so in my case primary key
is of type int so you mean to say I will get an object of type Integer(is it
so).
So I should use resultclass in selectkey key tag as primitive int or as
java.lang.Integer.
SELECT nextval('MSC
Jeff, I am writing (trying) it that's why I am asking question my friend, why
would I just keep writing mails.
-Original Message-
From: Jeff Butler [mailto:jeffgbut...@gmail.com]
Sent: Thursday, February 12, 2009 11:43 PM
To: user-java@ibatis.apache.org
Subject: Re: KeyProperty attribute
Yes, that is correct. It does not matter if you specify "int" or
"java.lang.Integer". "int" is an alias for java.lang.Integer. See page
40 of the developer guide. The insert() method returns an object, so it
has to be an Integer.
You should have a read through the iBatis Developer guide
(http:
Thanks Kevin,
Appreciate your help and effort in making me understand this.
Will go through the tutorial from the next time before posting anything on the
forum ,though I usually do as I have been reading " Ibatis in action" before
posting in here.
Regards
Rahul
__
On Thu, Feb 12, 2009 at 11:16 AM, Burke.Kevin wrote:
> Hmmm...I have the iBatis source. I think I will have to step down and
> get dirty to see what is happening. I know how to avoid this side
> effect, but curiousity has me now. From the replies, it doesn't sound
> like anyone else running Syb
I've been using iBatis with ASE for quite some time now and I have never
encountered this issue with delete. If it works via iSQL then it should
work via JDBC. You can always enable tracing in the JConnect driver to
ensure that the SQL being executed is what you expect. You can even
intercept t
I have not tried this, because I wasn't sure where I should actually make this
call. This is a tomcat app, Im sure im not the only person to do this. Im
wondering what others have done as far as placing this method call within their
code?
-Ryan
-Original Message-
From: Young, Alistair
Richard,
My log4j.properties is in the original message below. Lemme know
what you get. It seems really simple.
-Ryan
-Original Message-
From: Richard Yee [mailto:r...@cruzio.com]
Sent: Wednesday, February 11, 2009 9:17 AM
To: user-java@ibatis.apache.org
Subject: Re: logging not
Call me crazy Rahul, but if you are trying it then would you not
already know what type would be returned simply by examining the type
that is actually returned?
Judging by your code above the "resultClass='int'" above should mean
you are getting a java.lang.Integer back. I *think* it should also b
I think the real issue is that you need to take 30 min and read the
developers guide that our team has spent good time to put together.
It would explain this very issue.
Nathan
On Feb 12, 2009, at 11:20 AM, Rahul Saluja wrote:
Jeff, I am writing (trying) it that's why I am asking question m
33 matches
Mail list logo