Re: [ANNOUNCEMENT] iBATIS Project Team Moving to Google Code

2010-05-30 Thread Zoran Avtarovski
I don¹t mean to be a pain, but is there a way of subscribing to the new list without having to join google? I really don¹t want to have another account to manage, especially with them. I¹m happy to do it through nabble as I already use them. Z. ANNOUNCEMENT Eight years ago in 2002, I

Re: iBatis 3.0 minimal complete example

2010-02-10 Thread Zoran Avtarovski
To be honest I think the choice of front end matters little. The key aspect is the data layer - IB3 and any dependency injection used. I think one example using spring and another using Guice is more than enough. Z. how about we leave out the whole J2EE stack and anything that goes with

Re: IB3 Spring Integration

2009-12-06 Thread Zoran Avtarovski
integration themselves since it would be more reliable. I've programmed mine based on Spring's 2.5 integration with iBATIS 2 and the code may be outdated for Spring 3. Christian From: Zoran Avtarovski [mailto:zo...@sparecreative.com] Sent: Wednesday, December 02, 2009 12:47 AM To: iBatis Java

IB3 Spring Integration

2009-12-01 Thread Zoran Avtarovski
I was wondering if anybody has done any work on spring integration for IB3. I had quick look and it¹s doesn¹t look like a trivial matter to migrate the code from 2 to 3. I notice that spring 3.1 has plans for IB3 support but that¹s still a way off. Ideally some level of support for 2.5 would be

Re: iBATIS 3.0 selectOne SessionException if no data found

2009-08-27 Thread Zoran Avtarovski
I for one would prefer null. I like the idea of testing for null rather than using try catch Z. Rick's suggestion is correct.  That was the idea. Honestly, we don't have to throw the exception, but it is a good in practice IMHO... But you all tell me, do you really want to return null? 

Re: iBATIS 3.0 selectOne SessionException if no data found

2009-08-27 Thread Zoran Avtarovski
that the exception should be better... but I don't suggest using it for flow control.  Thoughts? Clinton On Thu, Aug 27, 2009 at 5:25 PM, Zoran Avtarovski zo...@sparecreative.com wrote: I for one would prefer null. I like the idea of testing for null rather than using try catch Z

Re: Separate iBATIS3 mailing list

2009-08-24 Thread Zoran Avtarovski
I agree whole heartedly. It also helps people who haven¹t yet made the jump to get a feel for what to expect in migration. Z. Heh - I hadn't had my coffee yet. ;-) Here are a few reasons: Pick one or take two, they're small. #1 - It's a bad idea to fragment an already small community

[IB3] Some questions

2009-08-12 Thread Zoran Avtarovski
First off, fantastic effort guys. This looks like a unbelievable release. The improvements over the previous version are just incredible. I¹m especially a fan of the new collection tag. I¹ve been reading over the user guide and I have a couple of questions : In V2 and prior $value$ resulted in a

Re: [IB3] Some questions

2009-08-12 Thread Zoran Avtarovski
Thanks Jeff, I asked about the string substitution because the docs use the ${...} notation for primitives or simple data types. Is the user guide incorrect then? Z. Some answers... String substitution is still there. Use this: ${...} The expression language is OGNL - OGNL is included

Re: N+1 Null value objects

2009-06-23 Thread Zoran Avtarovski
. This maybe? http://issues.apache.org/jira/browse/IBATIS-375 http://issues.apache.org/jira/browse/IBATIS-375 Jeff Butler On Tue, Jun 23, 2009 at 12:04 AM, Zoran Avtarovski zo...@sparecreative.com wrote: I¹ve come across a problem I haven¹t seen for long time. I¹m running an n+1 query

N+1 Null value objects

2009-06-22 Thread Zoran Avtarovski
I¹ve come across a problem I haven¹t seen for long time. I¹m running an n+1 query. If the query returns no children I get a single child object with null values. I thought there was a way to prevent null value objects from being generated by I can¹t remember how. Does any of this sound

Re:

2009-04-13 Thread Zoran Avtarovski
That¹s why I¹ve never managed to get it to work. Can I suggest that for the next version the logic be reversed on inserts. It¹s not a big deal as it makes sense to implement this type of logic in the business layer but for simple projects it might be beneficial. Z. Null value replacement

Re: [VOTE] Should iBATIS support SQLJ?

2009-01-26 Thread Zoran Avtarovski
Apologies for being late. It was a long weekend down here. 0 I agree it¹s a dying technology, but if the contributors are willing to maintain it and it won¹t affect performance for non SQLJ implementations... Z. Hi everyone, A group of developers have approached us with a contribution of

Re: [SURVEY] How many connections are in your pool?

2009-01-20 Thread Zoran Avtarovski
By no means am I an expert in this field, but last year I was working on a large app. The DB guy had pretty impressive knowledge, not just about databases but also app servers and connecting to DB¹s in general. He had done some performance monitoring on a number systems with varying loads and

Re: Best practice for using Ibatis in Web application

2008-12-02 Thread Zoran Avtarovski
+1 Spring and ibatis make life much simpler when used together. Z. I agree with Kai, for me Spring and Ibatis are the better way to use Ibatis in a web Application. Regards

Re: [ANNOUNCE] Abator renamed to iBATOR

2008-04-15 Thread Zoran Avtarovski
Sorry Jeff, I lost my mail server yesterday afternoon ­ just found it this morning hiding under the rug:) With regards to foreign relationships I thought about what you said and I think on the whole you¹re right. I don¹t want ibator (to avoid confusion, I¹ll stick with this name for now on) to

[ABATOR]: Question and feedback

2008-04-13 Thread Zoran Avtarovski
I used Abator for the time last week on a small project that I was trying to get out the door in hurry. First impressions are great, it helped me the base code out in no time flat and allowed me to focus on the stuff that needed it. This is a great tool Jeff. I have a couple of questions /

Re: Can't get Log4J to shut up

2008-03-31 Thread Zoran Avtarovski
This is the part I find really weird. If I remove the ibatis specific stuff from the log4j properties file we get no ibatis logging info. So my grasp of log4j isn¹t as good as I had hoped. The problem is I¹d still like to get the ERROR and WARN logs from ibatis. Z. I¹m deploying an ibatis

Can't get Log4J to shut up

2008-03-30 Thread Zoran Avtarovski
I¹m deploying an ibatis based on onto to Tomcat (6.0.13) for the first time. Everything has been great and while I had set the log level to debug logging was working as should. But now I can¹t get log4J to only log error events. My log4j.properties file is listed below. As you can see it

Re: Re : OT: Preventing sql injection attack

2008-02-22 Thread Zoran Avtarovski
That's right. But in the case of an auto complete query you want to search words starting with your argument which needs to look like: select from table where login = 'fre%' By escaping any single quotes in java covers most attacks but it's a shame there's no SQL function for

Re: OT: Preventing sql injection attack

2008-02-22 Thread Zoran Avtarovski
, then another option...add the % to the user provided input. Larry On Wed, Feb 20, 2008 at 10:23 PM, Zoran Avtarovski [EMAIL PROTECTED] wrote: Thanks Larry, But no joy. The db is MySQL 5. To provide more details we are already escaping single quotes with two single quotes

Re: OT: Preventing sql injection attack

2008-02-22 Thread Zoran Avtarovski
Good point. I might have a look at the Prepared statement source and use that as a guide for implementing a utlity class to cover my ass. Z. I haven't implemented it yet, but I can't see a reason why it wouldn't work. I can not see either, but, to speed up such searches one usually indexes

OT: Preventing sql injection attack

2008-02-20 Thread Zoran Avtarovski
We have a web application with an ajax autocomplete text box. The problem is that currently the query statement for the ajax query is : Select * from table where column LIKE '$value$%' Which is susceptible to sql injection attacks. One solution is to have a separate connection pool with

Re: OT: Preventing sql injection attack

2008-02-20 Thread Zoran Avtarovski
. This should work: select * from table where column LIKE #value# || '%' Larry On Wed, Feb 20, 2008 at 9:40 PM, Zoran Avtarovski [EMAIL PROTECTED] wrote: We have a web application with an ajax autocomplete text box. The problem is that currently the query statement for the ajax query

Re: How to insert a row into MySQL?

2007-08-04 Thread Zoran Avtarovski
Just do a standard insert and don't include the id column. Hi. How to insert a new record in MySQL table in the case that the table uses an auto generated ID column? Thanks.

Re: Running dynamic sp

2007-08-01 Thread Zoran Avtarovski
The way we got around the risk of malicious users was to run $query$ using a separate db connection where the user for that connection only had read priviledges. Saves a lot of angst. Z. I can't avoid using $ in my case as I need a method to run any sp with varying no of parameters. Anyway

N+1 and pagination problem

2007-07-30 Thread Zoran Avtarovski
I've come across an issue using iBatis' n+1 implementation in combination external paging with DisplayTag. The issue lies with with the SQL LIMIT and OFFSET commands on complex queries. My problem is that when I execute a count statement: SELECT COUNT(*) from primary_table I get a resulting

Re: N+1 and pagination problem

2007-07-30 Thread Zoran Avtarovski
( select A.FIELDNAME, B.USERID from tblA A, tblB B where A.configUnitID = ? and A.USERUID = B.userUID order by A.FIELDNAME ) a ) b where num between 50 and 60 regards ashok On 7/30/07, Zoran Avtarovski [EMAIL PROTECTED] wrote: I've come across an issue using iBatis

Re: iBATIS Survey (10 Minutes)

2007-07-11 Thread Zoran Avtarovski
the JDBC metadata part in a spike I've done... ;-) Clinton On 7/10/07, Zoran Avtarovski [EMAIL PROTECTED] wrote: Putting aside the too many - too little options debate far a minute. Can somebody tell me if there is somewhere where we can vote for features for v3? Because I'd like

Re: iBATIS Survey (10 Minutes)

2007-07-10 Thread Zoran Avtarovski
Putting aside the too many - too little options debate far a minute. Can somebody tell me if there is somewhere where we can vote for features for v3? Because I'd like to throw in my 10¢ and vote for JDBC metadata support and expression language support within the XML config files. Z.

Re: 1:N:M

2007-07-05 Thread Zoran Avtarovski
Hi Colin, I know I've done a three level m2m relationship model using Ibatis, I just can't find the code at the moment. But simply we had a company domain object which contained multiple workplace objects which contained multiple locations. I don't remember there being any issues, but I'll keep

Re: Which to choose : iBatis or Hibernate

2007-07-05 Thread Zoran Avtarovski
This being an iBatis list I dare say you will get overwhelming support for it (which I agree with). There are a lots of independent comparisons out there. Try googling ibatis v. Hibernate. You will see that each has its advantages and disadvantages with relation to the type of project you are

Purpose of sqlClientTemplate

2007-06-06 Thread Zoran Avtarovski
I've been looking the the instructions on migrating from Ibatis DAO to Spring DAO on the wiki http://opensource.atlassian.com/confluence/oss/display/IBATIS/Converting+iBA TIS+DAO+to+Spring+DAO The DAO classes extend org.springframework.orm.ibatis.support.SqlMapClientDaoSupport which has support

Re: Desktop apps with iBatis

2007-06-03 Thread Zoran Avtarovski
Have you seen this: http://spring-rich-c.sourceforge.net/ Z. Hello, tank you for reply. Would be possible to post a some code that shows how to initialize this application context? My application must have an ApplicationContext object with loaded definitions of applicationContext.xml

Re: Please help me.

2007-06-01 Thread Zoran Avtarovski
I'm not sure I'm clear on this. Have you set up your connection pool in Weblogic via JNDI if so it's a simple matter matter of using the JNDI name in your transaction manager transactionManager type=JDBC dataSource type=JNDI property name=DataSource value=${JNDI_NAME}/

Re: Please help me.

2007-06-01 Thread Zoran Avtarovski
In your SqlMap.xml try the following: sqlMap namespace=Department select id=departmentcode remapResults=true parameterClass=String resultClass=hashmap select departmentcode from $value$.DEPARTMENT /select /sqlMap Then your Java code you have a few errors. You need to cast the result to

Re: Problem with Complex Property

2007-04-30 Thread Zoran Avtarovski
Isn't your select statement only returning distinct profil values. You need to include the id and droits columns in order for your config to work. Z. I have a problem while using complex properties. Here is my code : resultMap id=Utilisateur.map class=Utilisateur.classe result

Re: iBATIS in Action errata

2007-03-19 Thread Zoran Avtarovski
I didn't mean it to me that harsh. I love iBatis. I really do. It's just when a book starts to gather dust after just a couple of weeks you have to question its value. As I said in the review, the book faces stiff competition from a great online user guide to begin with. The great documentation

N+1 problem

2006-09-25 Thread Zoran Avtarovski
Title: N+1 problem Im having an issue with my N+1 resultset. Its throwing up a quirk I havent seen before. Im building a menu-submenu structure. The resultset Im getting from mysql is as expected (see below). Each main menu item (label, value set) has a list of submenu items (test_id,

Re: N+1 problem

2006-09-25 Thread Zoran Avtarovski
Version 2.1.7 Z. What version of iBATIS are you using? On Tue, 2006-09-26 at 10:19 +1000, Zoran Avtarovski wrote:

Re: iBatis Book

2006-05-14 Thread Zoran Avtarovski
For what it's worth I'd just like to say that iBatis has what I consider to be the best level of documentation and support of any OS project I've worked with. I think Clinton, et al deserve kudos for the amount of effort put into documentation and support. I also think that's the reason

Namespace Again

2006-04-17 Thread Zoran Avtarovski
When using Ibatis 2.x do I need to have the setting useStatementNamespaces=true in order to access select statements in other sql mapping files? At present I don't and I'm getting an error when trying to access a statement in another file. For example I have a result map entry: result

Re: Abator-dedicated mailing list?

2006-04-05 Thread Zoran Avtarovski
I see where you're going with this but I'd also like to say that there's probably a number of people out there (me included) who aren't currently using it but are keeping an eye on it for future use. I have a new project coming up where I'd like to give it a whirl and it's nice to keep track of

Re: M:N solution and populating arrays instead of List

2006-03-27 Thread Zoran Avtarovski
Hi Raul, I'm not sure if it's the best way, but we had the same requirements and were able to do it by setting some extra getter and setter methods in the in our Java object. In you your example for instance to return an array we would set a getter called getReclamationArray() and convert the

Re: Extending resultsets

2006-03-27 Thread Zoran Avtarovski
I'm an idiot. Thank you. I'm having trouble reading the documentation (I mean technically, but it could also be literally). I didn't think to look at the DTD. Zoran This is exactly the syntax that is available. Have you looked at the DTD? -Original Message- From: Zoran Avtarovski

Re: What is wrong with this SQL statement

2006-03-06 Thread Zoran Avtarovski
What DB are you using? I've found out the hard way that if you don't use correct ANSI syntax you can get unexpected results. Try changing the statement from a join to a inner join like: FROM (ITEM I inner join PRODUCT P on P.PRODUCTID = I.PRODUCTID) Or even better get rid of the parenthesis.

OT: Need Help with SQL Join

2006-02-08 Thread Zoran Avtarovski
I have a parent:child table relationship using a Join SQL statement and I am having trouble getting it right. One parent many children. The starting statement is: SELECT * FROM Users as U left outer join UserCat as UC on U.user_id = UC.user_id This simple statement returns all content from

Re: OT: Need Help with SQL Join

2006-02-08 Thread Zoran Avtarovski
AND UC.status = 1 Zoran Avtarovski a écrit : I have a parent:child table relationship using a Join SQL statement and I am having trouble getting it right. One parent many children. The starting statement is: SELECT * FROM Users as U left outer join UserCat as UC on U.user_id

Re: RE nedd help with sql

2006-02-08 Thread Zoran Avtarovski
This is what I tried first but it threw an SQL error. Z. I think you can use a sub query so SELECT * FROM Users as U left outer join ( Select FROM UserCat WHERE status = 1 ) UC on U.user_id = UC.user_id WHERE U.status = 1 Steve This e-mail and any attachment is for authorised

Re: Multiple n+1

2006-02-03 Thread Zoran Avtarovski
this works, add Category again. The example in the Wiki is too simple IMHO, we should try to add a more complex one... Nils On Thu, 02 Feb 2006 21:10:50 +1100, Zoran Avtarovski [EMAIL PROTECTED] said: I've been trying to get a n+1 example to work without much luck and I think that I may

Multiple n+1

2006-02-02 Thread Zoran Avtarovski
I've been trying to get a n+1 example to work without much luck and I think that I may have misunderstood the wiki article. I have intentionally kept the example simple so I can fully understand the concepts and then apply it to the real world app which uses the same principles. I have three

OT: Left Join Question

2005-12-13 Thread Zoran Avtarovski
I've come across a stumbling point in my web app. I used a left join in a previous app to get a list of items used to populate a set of check box items and to see if they were checked. eg SELECT list_item.value, list_item.label, m2m.trans_id FROM list_item LEFT_JOIN m2m ON (m2m.response_id =

OT: N+1 Best Practice

2005-10-20 Thread Zoran Avtarovski
I have a pretty straight forward situation: In a html form we ask a number of questions which have check box answers. When the form is submitted we used to save the responses for each question as a comma delimited string of the results in a table with a unique identifier and string fields, as