Hi,
I have the following db table (MySQL):
CREATE TABLE `examples`(
`id` SERIAL PRIMARY KEY,
`name` VARCHAR(255),
`status` VARCHAR(20) NOT NULL DEFAULT 'ready',
`description` TEXT
) ENGINE=innodb DEFAULT CHARSET utf8 DEFAULT COLLATE utf8_bin;
Using ibatis sql-map I'm
ment feature, read user manual.
>
> Kengkaj
>
> On Tue, Mar 17, 2009 at 10:37 PM, Alin Popa wrote:
>>
>> Hi,
>>
>> I have the following db table (MySQL):
>>
>> CREATE TABLE `examples`(
>> `id` SERIAL PRIMARY KEY,
>>
>>
>> For , I think that we should specify value explicitly in the
>> model, error from database is correct behavior in case the field has null
>> value (actually this is the reason why we set NOT NULL constraint).
>>
>> Kengkaj
>>
>>
>> On Wed, Ma
t; I haven't tested this, but it should work.
>
> Regards,
> Iwao
>
> on 09.3.18 9:42 PM Alin Popa said the following:
>> Thanks Nicholoz,
>>
>> This is what I've done. And I also have a facade that will abstract
>> for the user, the insert actions.
>>
Hi,
It's possible to display the executed SQL somehow ?
I know it's about doing the PreparedStatement ... but .. maybe there
is an option to set in order to display these.
Some workaround also will be helpful.
Thanks.
--
Best Regards,
Alin
Cool,
Thanks.
On Thu, Mar 19, 2009 at 5:17 PM, Nicholoz Koka Kiknadze
wrote:
>>
>> It's possible to display the executed SQL somehow ?
>
> Sure, it's possible to log what statements are prepared, what parameters are
> set to and what results are retrived. Check the
> 'Logging SqlMap Activity' se
Hi,
I'm using iBatis with MySQL and also trying to do some pagination:
return getSqlMapClientTemplate().queryForList("getAll", skipResults,
maxRecords);
and the "getAll" query:
SELECT * FROM mytable
Indeed, the pagination seems to work fine, BUT in mysql logs I see
executed
Thanks Larry for your quick response.
If I'm doing it in Mysql statement, I'll do it using LIMIT which is
taking exactly the same 2 params like ibatis (skipResults and
maxRecords).
My dilemma is: why ibatis is doing this kind of abstraction if on the
underlying server is doing it wrong ? Might ca
to doing pagination
> with iBatis as well but would not want a full scan on the DB but rather only
> get amount of rows specified by skipResults
>
> On Fri, May 15, 2009 at 12:10 PM, Alin Popa wrote:
>>
>> Hi,
>>
>> I'm using iBatis with MySQL and a
ke this in iBatis:
>
> SELECT rownum, table_name
> FROM user_tables
>
> WHERE rownum <=;
> so when I call this from my code. will the above query be ran 5 times??
>
> On Fri, May 15, 2009 at 12:42 PM, Alin Popa wrote:
>>
>> Bhaarat,
>>
>> If you're using
Can anyone please suggest me a link to ibatis documentation regarding
$substitution$ ?
Thanks.
On Fri, May 15, 2009 at 7:15 PM, Larry Meadors wrote:
> Do it in the sql statement instead of using pagination in ibatis.
>
> Look at limit, row_count and offset here:
>
> http://dev.mysql.com/doc/refm
I wanted to say that is retrieving all the data from database (into
memory) and after that is iterating over it. What is happening when
"SELECT * FROM mytable" is returning 5 MIL records ? For sure I don't
want that. I don't know if mysql knows how to do optimization without
"helping" it somehow (L
Hi,
There is a place where I can find some documentation/examples/links
related to string substitution in ibatis ? ($substitution$ thingy
)
In the official pdf documentation I didn't find anything about it;
also google didn't helped much.
Thanks,
Alin
it. You open yourself to SQL
> injection risks. In other words don't take a value that is passed in from a
> web page and assign it in your SQL as s literal.
>
> Brandon
>
>
> On Fri, May 15, 2009 at 3:52 PM, Alin Popa wrote:
>>
>> Hi,
>>
>> There
Hi Joson,
Afaik, the only way to display the executed query is by enabling logging for
Connection ... etc.
It will display the queries before preparation.
As a workaround, I enable sql logging for server (mysql in my case).
Indeed, it will really help if ibatis can display the SQLs in an explicit
Hi Babitha,
Hopefully that I understand right your issue, so, here is how I made it (and
I think also this is the iBatis way to handle it)
SELECT obj.id as id, obj.name, obj.details, p.id as proper
Hi,
I suggest doing something like that (this example was not tested):
On Wed, Jun 10, 2009 at 9:06 PM, cbchhaya wrote:
>
> Unfortunately that doesn't work either.
>
> The question in really simple terms:
>
> What should be the result map for this clas
17 matches
Mail list logo