Re: Archive Search and Question on updates in JPetstore

2005-06-14 Thread Larry Meadors
They are working, but the mailing list address has changed recently, so there is not much to search. ;-) The old email archives are here: http://www.mail-archive.com/ibatis-dev%40incubator.apache.org/ http://www.mail-archive.com/ibatis-user-cs%40incubator.apache.org/

Re: Multiple Objects as parameters

2005-06-14 Thread Larry Meadors
you could do a couple of things: 1) Put both the use and address into a map: Map params = new HashMap(); params.put(user, user); params.put(address, address); 2) Create a bean for them: class UserAddress{ private User user; private Address address; public void setUser(User u){this.user =

Re: Array of Domain Objects - from queryObject

2005-06-14 Thread Larry Meadors
Man, this sounds like an RTFM kinda question unless I am misreading it. resultClass=my.domain.ObjectClass List employeeList = queryForList(getEmployee,null); Larry On 6/14/05, Jason Hall [EMAIL PROTECTED] wrote: Hi, Is there a way to get an array of Domain objects or a list of

Re: [HELP] Warning when using JSDK1.5 to compile

2005-06-15 Thread Larry Meadors
Sun changed the API of the Method class from public Object invoke(Object obj, Object[] args) ...to... public Object invoke(Object obj, Object... args) In either case, the behavior is the same. It is just a warning, not an error, so things should work fine. Larry On 6/15/05, Pham Anh Tuan

Re: Content is not allowed in prolog

2005-06-22 Thread Larry Meadors
This really is not an iBATIS issue, but I suspect you must need to somehow edit the XML in a plain text editor, and make sure there are no unicode charaters in it, and that the very first line begins with ?xml - on the first line with no spaces before it. On 6/22/05, Mitchell, Steven C [EMAIL

Re: Get return value of stored procedure

2005-06-23 Thread Larry Meadors
On 6/23/05, Bing Qiao [EMAIL PROTECTED] wrote: Help please! I have had several talks with our DBA who is so skeptical of iBATIS and vow to force us to go back to jdbc. One of his arguments is that the return code from stored procedure can not be retrieved by sqlmap. First: That is just

Re: lock

2005-06-23 Thread Larry Meadors
How would you do it with JDBC? On 6/23/05, Henry Lu [EMAIL PROTECTED] wrote: How do i set sqlmap for the following SQL statement: lock table x in shared mode ? -Henry

Re: table with export and sorting

2005-06-23 Thread Larry Meadors
On 6/23/05, Bharat Nagwani [EMAIL PROTECTED] wrote: Using displaytag-1.0 with struts snip anyone encountered the same before? Ooops! Wrong list. :-D Larry

Re: PaginatedList question

2005-06-28 Thread Larry Meadors
Could you add your experience with this to the WIKI? Something in the FAQ re: How do I get record/page counts for a mapped statement? would be great. Larry On 6/28/05, Aladin [EMAIL PROTECTED] wrote: Hi, Thanks for the responses. It's unfortunate that the documentation was wrong...

Re: Reload Lazy Objects

2005-06-29 Thread Larry Meadors
Could you just have your user object delegate the retrieval of the list to the service object (instead of storing it internally) and rely on caching instead of lazy loading? If an update occurs, the cache gets flushed, and the next call to get the list gets fresh data. Larry On 6/29/05, Mike

Re: Reload Lazy Objects

2005-06-29 Thread Larry Meadors
(or grab the DAO from the factory singleton in the constructor) and do away with the service layer altogether. It seems that sometimes design comes down to splitting hairs... -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 29, 2005 12:55 PM

Re: Returning Results from queries of a parameterized table name!!!

2005-06-29 Thread Larry Meadors
Good grief, why are you reinventing the wheel? I guess you can iterate through the list, then iterate through the maps in the list, examining the types of the entries, escaping the strings/numbers/dates, etc into a text file...but man, that sure seems like a ton of work. Larry On 6/29/05,

Re: Using LIKE clause in SqlMap

2005-06-29 Thread Larry Meadors
http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+use+LIKE+in+my+queries%3F On 6/29/05, Rao, Satish [EMAIL PROTECTED] wrote: I have the following entry in my sqlmap: select id=listUsersByFilter parameterClass=com.classname resultMap=list-users-result

Re: Cache not being flushed

2005-06-30 Thread Larry Meadors
Are you using namespaces? Larry On 6/29/05, Clinton Begin [EMAIL PROTECTED] wrote: It looks rightbut this is the second time this has been reported in recent months. We have about 6 unit tests just to verify cache flushing on execution, so I'm not sure what it could be. Any chance

Re: Regarding Namepsace and sqlMaps

2005-06-30 Thread Larry Meadors
Yes. As long as the order that the files are added to the sql map is correct (this order issue is considered a bug, and is being worked on). Could you send future questions to user-java@ibatis.apache.org, please? I do not mind answering them, it is just that if they get answered on the list,

Re: Countng Rows

2005-07-04 Thread Larry Meadors
Not the source of the issue, but it looks like you have an extra where in that statement, too. On 7/3/05, Folashade Adeyosoye [EMAIL PROTECTED] wrote: I have quick question please… I am trying to run a select count(*) and seem to be getting a ClassCast Exception… here is the code.

Re: Advantage of Map over Bean as a parameterObject?

2005-07-04 Thread Larry Meadors
Yes, there are many examples using Maps. You have convinced me to try not to do another one with a Map; Beans are truly the better way to go. Larry On 7/3/05, Folashade Adeyosoye [EMAIL PROTECTED] wrote: Thanks the reason I asked was because all the examples I have seen online seems to

Re: Advantage of Map over Bean as a parameterObject?

2005-07-04 Thread Larry Meadors
On 7/3/05, netsql [EMAIL PROTECTED] wrote: 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. CRUFT - (n) The results of shoddy construction. Hmm, every application I have ever had

Re: Inline parameter

2005-07-05 Thread Larry Meadors
I believe you can do something like this: #parmName,mode=OUT,jdbcType=NUMERIC#, but IMO, the real question is why? Inline parameters are a great shortcut, but if you have already created a working parameter map, why mess around trying to make it work with an inline one when you lose both

Re: R: [HELP] Whether or not iBatis support SQL Injection?

2005-07-05 Thread Larry Meadors
Yes, it does pass the SQL directly to the driver, but unless you use the $$ syntax for parameters, you should be safe with iBATIS. The $$ syntax is the only part of iBATIS that allows string concatenation, which is the biggest source of SQL injection attacks. If you are using a really crappy

Re: Caused by: com.ibatis.sqlmap.client.SqlMapException: Unrecognized parameter mapping field

2005-07-05 Thread Larry Meadors
Any fields with # in them need to be escaped with ## A.PCVER# AS PCVER, - should be - A.PCVER## AS PCVER, ..and... WHERE A.Pcpord = VALUE# - should be - WHERE A.Pcpord = #VALUE# What db is this? That is a freaky looking join with all the in there. Larry On

Re: [HELP] Whether or not iBatis support SQL Injection?

2005-07-05 Thread Larry Meadors
When you use this: select id=good resultMap=myResultMap select * from foo where id = #value# /select ...and call it like this: MyBean b = (MyBean)sqlMap.queryForObject(good, new Integer(1)); ...iBATIS creates a prepared statement, so the SQL that goes to the database is: select * from foo

Re: [HELP] Whether or not iBatis support SQL Injection?

2005-07-06 Thread Larry Meadors
- From: Larry Meadors [EMAIL PROTECTED] To: user-java@ibatis.apache.org Sent: Wednesday, July 06, 2005 10:25 AM Subject: Re: [HELP] Whether or not iBatis support SQL Injection? When you use this: select id=good resultMap=myResultMap select * from foo where id = #value# /select

Re: Building iBATIS_DBL-2.1.0.565

2005-07-06 Thread Larry Meadors
Sorry, i assumed you were building it from the repository. Larry On 7/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Where is file build.bat? I don't see it in the zip file. Larry Meadors [EMAIL PROTECTED]To: user-java

Re: SAXParseException, parsing the sqlMap-config.xml file!

2005-07-07 Thread Larry Meadors
Or try to use a validating editor, like JEdit. On 7/7/05, Brandon Goodin [EMAIL PROTECTED] wrote: Apparently you have an element type that is not in proper order with the DTD. Caused by: org.xml.sax.SAXParseException: The content of element type sqlMapConfig must match

Re: Best mechanism to read large datasets

2005-07-08 Thread Larry Meadors
Using queryWithRowhandler() as Michal suggested is the iBATIS solution. That said, I would seriously consider doing the process with a stored procedure if possible. You will get WAY better performance, and reduce network traffic significantly. Larry On 7/8/05, Rao, Satish [EMAIL PROTECTED]

Re: Best mechanism to read large datasets

2005-07-08 Thread Larry Meadors
On 7/8/05, Michał Małecki [EMAIL PROTECTED] wrote: ...hopefully you can write it in Java ;) Why does it matter? Code is code... ;-) Larry

Re: null value from db query caused ibatis setProperty error

2005-07-12 Thread Larry Meadors
This is not really related to iBATIS, but just a simple fact of Java - it is not possible to represent null values in a primitive variable unless you want to use a magic number (i.e., assume that -1 or 0.123 is null - which IMO is a very, very bad idea). If you need null, use Float, not float.

Re: How to get ## into a SQL statement

2005-07-12 Thread Larry Meadors
- From: Larry Meadors [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 8:59 AM To: user-java@ibatis.apache.org; Brice Ruth Subject: Re: How to get ## into a SQL statement The remapResults attribute should not be required - the table name changes, but the column list does

Re: How to get ## into a SQL statement

2005-07-12 Thread Larry Meadors
- From: Larry Meadors [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 8:59 AM To: user-java@ibatis.apache.org; Brice Ruth Subject: Re: How to get ## into a SQL statement The remapResults attribute should not be required - the table name changes, but the column list does

Re: How to get ## into a SQL statement

2005-07-12 Thread Larry Meadors
this symptom. Of course, this is all guess-work, as I don't have the code in front of me ;) Brice 2005/7/12, Larry Meadors [EMAIL PROTECTED]: Nope, that is not a bug IMO. If you want to construct dynamic SQL using $substitution$, I think that should work as it does. Larry

Re: Using JNDI programmatically.

2005-07-13 Thread Larry Meadors
Yes. Any attributes in in your xml file using ${myValue} notation will be substituted at runtime with the value in the properties object passed in that myValue is the key to. Does that makes sense? Larry On 7/13/05, REMIJAN, MICHAEL J [AG-Contractor/1000] [EMAIL PROTECTED] wrote: Hello

Re: queryForList not returning null

2005-07-13 Thread Larry Meadors
Where I work, we did that too, and it used to be one of our development standards. In fact, I was a leading proponent for the decision. However, we stopped when we realized that there are two choices you can make when you go down that path: 1) Mimic the existing API as closely as possible. 2)

Re: [jira] Commented: (IBATIS-170) i am not sure it is a bug!

2005-07-14 Thread Larry Meadors
PLEASE! PLEASE! PLEASE! If you are not 99.999% sure it is a bug, do not put it in JIRA. Larry On 7/14/05, leo zhang (JIRA) ibatis-dev@incubator.apache.org wrote: [ http://issues.apache.org/jira/browse/IBATIS-170?page=comments#action_12315824 ] leo zhang commented on IBATIS-170:

Re: n+1 is triggering multiple queries, 3?

2005-07-14 Thread Larry Meadors
p6spy is also a great sql logging tool. On 7/14/05, Ron Grabowski [EMAIL PROTECTED] wrote: The Java version of iBATIS has support for logging all sql sent to the database. Here's some sample output: http://issues.apache.org/jira/browse/IBATISNET-35 --- Kris Rasmussen [EMAIL PROTECTED]

Re: iBATIS 2.1.5 is out (despite the website)

2005-07-19 Thread Larry Meadors
If you are looking to create customized XML output, one approach I have been looking at is using a rowhandler to do it. It is very simple, efficient, and very flexible. Larry On 7/19/05, Abdullah Kauchali [EMAIL PROTECTED] wrote: Abdullah Kauchali wrote: 2. the possibility of writing your

Re: Is there a way to validate parameterClass and resultClass for each ibatis query before runtime?

2005-07-22 Thread Larry Meadors
Usually simply loading the sql map shows much of that. There is a property that is earmarked to show more info, but it has yet to be implemented. This has been at the top of my wish list for some time now, too. Just too much other crap in front of it I guess. ;-) Larry On 7/22/05, Bing Zou

Re: problem with white space

2005-07-23 Thread Larry Meadors
You might be able to use select trim(someField) from table to avoid this. My guess is that this really has nothing to do with iBATIS, and everything to do with the JDBC driver or database. Larry On 7/23/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi,I'm new here, I'm not english therefore

Re: Mock for DaoManager

2005-07-26 Thread Larry Meadors
I am not sure what you are trying to do here..do you want the DAOs defined in the dao.xml, or do you want to return different ones? It would be a fairly straightforward exercise to build one that mimicked the StandardDaoManager class, and exposed the dao maps so you could replace them. What is

Re: Mock for DaoManager

2005-07-26 Thread Larry Meadors
The MockDao object would just keep all the data in memory and the implementation of each method would return data that I could use for testing, without requiring a call to the database. -Original Message-From: Larry Meadors [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 26, 2005 8:30

Re: ResultMap as a HashMap?

2005-07-26 Thread Larry Meadors
Quoting Michal Malecki: Sure, you have two methods in SqlMapExecutor: queryForMap(String id, Object parameterObject, String keyProp) queryForMap(String id, Object parameterObject, String keyProp, String valueProp) These do exactly what you are asking for.. Larry On 7/26/05, Eduardo Piva [EMAIL

Re: Mock for DaoManager

2005-07-26 Thread Larry Meadors
. Thanks for the help. -Original Message-From: Larry Meadors [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 26, 2005 9:20 AMTo: user-java@ibatis.apache.orgSubject: Re: Mock for DaoManagerHmm, ok.Two options to consider:1) Use dbunit to populate a database, and use your

Re: QueryForObject returns wrong data

2005-07-27 Thread Larry Meadors
On 7/27/05, Jeff Butler [EMAIL PROTECTED] wrote: I think we have the answer.I don't know why it works even the firsttime without specifying the scale.Weird.Anyway, iBATIS does not currently offer a way to set the scale onoutput parameters.I think what's needed is a change to the parameter map so

Re: QueryForObject returns wrong data

2005-07-27 Thread Larry Meadors
Well, you can always get the source from SVN and build it. If you do that, please share the changes, and we will get them incorporated faster. Larry On 7/27/05, shilpa [EMAIL PROTECTED] wrote: shilpa shilpa.pradhan at judiciary.state.nj.us writes: Hi, It may sound little strange, but I am getting

Re: Problem with DB2, IBATIS and IBM Updatable Cursors

2005-07-28 Thread Larry Meadors
With a stored procedure, it would be a snap. Larry On 7/28/05, Juanpe [EMAIL PROTECTED] wrote: Hello!I have a problem with IBM Updatable Cursors (DB2), I need to associatea cursor to a select sentence, to use it in another sentence (anupdate sentence). The code would be the following one (SELECT

Re: Multiple inserts

2005-08-01 Thread Larry Meadors
At forst glance, I'd consider a stored procedure to do the 3 inserts, and using a batch to execute the loop. I.e., something like this: start batch start loop call stored proc end loop end batch Are the 1 rows that you will be inserting predicatable? By that, I mean are the information

Re: simple example

2005-08-01 Thread Larry Meadors
Here is one: http://www.mail-archive.com/ibatis-user-java@incubator.apache.org/msg01759.html LarryOn 8/1/05, Неверов Дмитрий [EMAIL PROTECTED] wrote: Hi,I'm very new to iBatis and try to learn it usingiBATIS-SqlMaps-2-Tutorial. And I don't understand how to build example(have I use ant) and how

Re: Stored procedure with queryForList skipresults and maxresults

2005-08-01 Thread Larry Meadors
It is. When you use skip/max, the trimming is done after the results are retrieved. If you are looking to improve performance, it would be better to do it in the stored procedure. Larry On 8/1/05, Rao, Satish [EMAIL PROTECTED] wrote: I am using a queryForList with skipresults and

Re: Example of a queryForMap() call

2005-08-02 Thread Larry Meadors
queryForMap(getStudentNames, parameterMap, studentId, studentName);On 8/2/05, Nathan Maves [EMAIL PROTECTED] wrote:In the given example below select id=getStudentNames parameterClass=map select student_id as studentId student_name as studentName from students where student_id in( iterate

Re: Multiple select queries in one select tag

2005-08-03 Thread Larry Meadors
Not that I am aware ofwhy not just use a union? Larry On 3 Aug 2005 21:25:24 -, sreenivas [EMAIL PROTECTED] wrote: Hi, I would like to know whether or not below approach is possible with iBATIS. select id =getEmpDetails parameterClass = com.abc.Input resultClass = com.abc.Output select

Re: Multiple select queries in one select tag

2005-08-08 Thread Larry Meadors
Of those, point #1 is the one that interests me the most - I have wanted to do just that. Does a selectKey element allow retrieving more than one value? I need to try that. The other two seem esoteric, IMO. Larry On 8/8/05, Koka [EMAIL PROTECTED] wrote: Hi, I'm bringing this topic UP cause

Re: Xml Result Mapping

2005-08-08 Thread Larry Meadors
I agree, iBATIS does 99% of what you want..but not the XML results. Hmm, how do I say this nicely...the XML results that you get from iBATIS suck. (No offense to Clinton, it seemed like a good idea to me, too.) There, I said it, and will have to live with it forever in the archives. When you get

Re: Bidirectional associations and circular references

2005-08-09 Thread Larry Meadors
Hm, I am assuming this is something like an Order to OrderItem relationship. I'll try not to preach too much about this, but I generally shy away from these kinds of relationships, because they are rarely all that valuable. You could do this with a RowHandler by joining Order+OrderItem into a

Re: Passing a list as IN parameter to stored procedure

2005-08-11 Thread Larry Meadors
How would you do it with JDBC? Larry On 8/11/05, Rao, Satish [EMAIL PROTECTED] wrote: Has anyone had success with passing a java.util.List as IN parameter to stored procedure? If yes, what would the jdbcType in the sqlmap and what would be the corresponding declaration in stored

Re: SQLMaps and Web Services in the same application

2005-08-11 Thread Larry Meadors
Thanks! I added that to the WIKI... Larry On 8/11/05, Colin Lamond [EMAIL PROTECTED] wrote: Hi, I thought I would update the list to the solution. I am using the Sun WSDK 1.6 (Web Service Development Kit) which is shipped with JAXP 1.3. I am also running on J2SE 1.4, which includes

Re: Message: no WRITABLE property

2005-08-16 Thread Larry Meadors
I think that a getter named getpNoticeComanyNumber *should* work, according the java bean specification. However, I do not think that it will work with iBATIS, but cannot confirm this at the moment. Larry On 8/16/05, Nathan Maves [EMAIL PROTECTED] wrote: Here is the FAQ .

Re: Dynamic Database URL

2005-08-16 Thread Larry Meadors
You can pass in a properties object to the sqlmapclient builder that is substituted into the sqlmapconfig.xml file. But, you will need 3 instances of the SqlMap client.. Larry On 8/16/05, Nathan Maves [EMAIL PROTECTED] wrote: Is there a way to dynamically change the db url based on a

Re: Log location.

2005-08-16 Thread Larry Meadors
I presume you mean for MySQL? How would you do it with straight JDBC? Larry On 8/16/05, Gana [EMAIL PROTECTED] wrote: Hi, property name=logSlowQueries value=true/ I used this for logging the slow queries, I need to know the name on the property to decide the locations for the logs. Is

Re: where can I find a simple implementation example

2005-08-17 Thread Larry Meadors
On 8/17/05, Salim Madjd [EMAIL PROTECTED] wrote: Thanks, Larry. Yes, I have gone this far and have all the config and maps setup based on the documentations. Your example is great for stand-alone application. But I am looking for web application (tomcat 5.x and above or any servlet

Re: Getting auto-generated keys in mySql

2005-08-17 Thread Larry Meadors
M$SQL to MySQL?! Good for you! SELECT LAST_INSERT_ID() Larry PS: I'd use pgsql instead though. ;-) On 8/17/05, Barnett, Brian W. [EMAIL PROTECTED] wrote: We've been using SQL Server and are moving to mySQL. Can somebody tell me how to do this for mySql: selectKey resultClass=int

Re: Getting auto-generated keys in mySql

2005-08-17 Thread Larry Meadors
NO! That is really, really not thread safe! Imagine what happens when 2 ppl do inserts at the same time... [insert #1][insert #2][query #1][query #2] Both [query #1] and [query #2] return the same id. Ooops! kaboom! Larry On 8/17/05, Alan Hicks [EMAIL PROTECTED] wrote: Hi Brian, I had

Re: where can I find a simple implementation example

2005-08-18 Thread Larry Meadors
Having done a lot of JDBC coding myself, I do not think that is a great idea - I'd suggest spending the time to understand iBATIS first. It may take you a day or two to get rolling with it, but once you are using it, you will cut out a TON of coding that would be required with JDBC. Larry On

Re: Getting auto-generated keys in mySql

2005-08-18 Thread Larry Meadors
it return? Alan. Learn something NEW everyday On Wed, 17 Aug 2005 22:46:19 +0100, Larry Meadors [EMAIL PROTECTED] wrote: NO! That is really, really not thread safe! Imagine what happens when 2 ppl do inserts at the same time... [insert #1][insert #2][query #1][query #2] Both

Re: preparation failed UndeclaredThrowableException

2005-08-18 Thread Larry Meadors
We need more info...can you give us a stack trace? Is item a type alias? Larry On 8/17/05, Warren Bell [EMAIL PROTECTED] wrote: I am getting a preparation falied UndeclaredThrowableException when I call: return (Integer) executeQueryForObject(getTaxable, item); The SQL Map is:

Re: How to get table metadata?

2005-08-18 Thread Larry Meadors
Wouldn't a tool like dbunit do this better? Larry On 8/18/05, Folashade Adeyosoye [EMAIL PROTECTED] wrote: I use mine to back up my database, by passing in the table name into a method, and this methods creates a flat file with a whole bunch of inserts, that I can use to repopulate the table

Re: Is there a way secure the password used in sql-map-config.xml file

2005-08-18 Thread Larry Meadors
You might be able to create a datasource factory to do that, but by default, no. Larry On 8/18/05, Jason Hall [EMAIL PROTECTED] wrote: Hi, Just wanted to know if there is a way? Thanks, JH.

list test

2005-08-23 Thread Larry Meadors
sorry for the tests... :-/

Re: Confused with groupBy

2005-08-24 Thread Larry Meadors
Wow, lots of good questions. Starting with the easiest - the namespace attribute is used to logically group sqlmap elements - for example, you can define a Product namespace for mapped statements and related items that are to be used when working with products. That is done by setting the

Re: Mailing list test - PMC Members please read

2005-08-24 Thread Larry Meadors
We're back. :) On 8/24/05, Clinton Begin [EMAIL PROTECTED] wrote: Hi all, This is a test of the mailing lists. Will one PMC member please respond from each list? Thanks, Clinton

Re: Confused with groupBy

2005-08-24 Thread Larry Meadors
You got it exactly right. :-) Larry On 8/24/05, Alan Chandler [EMAIL PROTECTED] wrote: Larry Meadors writes: ... The groupBy attribute is used to deal with the N+1 selects problem. The N+1 Selects problem is caused by trying to load child records that are related to a list of parent

Re: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'

2005-08-25 Thread Larry Meadors
Can you send your xml file as an attachment, and also provide a stack trace? Larry On 8/25/05, Cesar Villar [EMAIL PROTECTED] wrote: Hi evereybody!! I have a dao layer defined in my sql-map-config with several sqlMaps. Recently, when i try to access to this layer i get this error: -

Re: Strange Problem..

2005-08-25 Thread Larry Meadors
The transaction's being rolled back, it looks like. Change your transaction manager to commitRequired=true and i think it will work. On a related note..you do know that you can do all of that without a stored proc, right? insert ... insert Person (Name) values (#name#) selectKey property=id

Re: Strange Problem..

2005-08-25 Thread Larry Meadors
, please, what I need to change to make this work? Larry Meadors wrote: The transaction's being rolled back, it looks like. Change your transaction manager to commitRequired=true and i think it will work. On a related note..you do know that you can do all of that without a stored proc

Re: Oracle scheme

2005-08-31 Thread Larry Meadors
One way would be to use $prefix$tablename in stead of just tablename. For oracle, prefix would be set to your schema name, for all others, it would be blank. Larry On 8/31/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello all, I use iBATIS to access ORACLE, MS SQL and other databases

Re: increase performance

2005-09-02 Thread Larry Meadors
How much data are you getting back with your query? 10 rows? 100 rows? 1000 rows? 1 rows? If you are getting back more than you *need* for the report, you should look at doing all the data processing with a stored procedure instead of in Java code. This will improve performance in several

Re: Conditional execution w/o SP

2005-09-06 Thread Larry Meadors
Sort of - you could do it with a statement using dynamic sql, but you will not be able to use the selectKey element. IMO this is a bad idea - do the logic in your DAO class instead of in a mapped statement. Larry On 6 Sep 2005 21:29:00 -, sreenivas [EMAIL PROTECTED] wrote: Hi, I have a

Re: Re: Conditional execution w/o SP

2005-09-06 Thread Larry Meadors
. Please let me know pseudo code, if possible. Thanks, Sreenivas On Wed, 07 Sep 2005 Larry Meadors wrote : Sort of - you could do it with a statement using dynamic sql, but you will not be able to use the selectKey element. IMO this is a bad idea - do the logic in your DAO class instead

Re: Connection hangs with SQL query string 1983 of length, can this be a SQLMap bug ?

2005-09-07 Thread Larry Meadors
Wow, that is a wacky one..it seems most likely that it is a driver issue (i can promise that there is no if(sql.length() == 1983) blowChunks(); code in SQL Maps. Can you try it with the latest Oracle drivers? From all reports, the 10g drivers resolved a ton of bugs that were popping up. It might

Re: XML document output from ibatis

2005-09-12 Thread Larry Meadors
Wit apologies to Clinton, my official opinion on iBATIS XML results is that they suck. If you want to do what you are describing, do it in your DAO class. If you want multiple records, do it with a RowHandler. Larry On 9/12/05, Ashish Kulkarni [EMAIL PROTECTED] wrote: Hi Is it possible to

Re: Serializable objects

2005-09-12 Thread Larry Meadors
That is probably the easiest route..I'd think long and hard about making that decision though, the consequences of that design are significant. Larry On 9/12/05, Eugeny N Dzhurinsky [EMAIL PROTECTED] wrote: Is there simple way to load/store HashMap in the database using the BLOB column and

Re: Eclipse plugin

2005-09-13 Thread Larry Meadors
I use IDEA - it does that sort of refactoring, and I thought eclipse did, too. Larry On 9/13/05, Joachim Hoffmann [EMAIL PROTECTED] wrote: Are there any plans for the integration of iBatis into Ecplise 3.1? ... e.g in order to use an XML editor from within the IDE and be able to benefit

Re: commit

2005-09-13 Thread Larry Meadors
Short answer: You don't. Long answer: It depends on what you want to do. If you do not need actions grouped into transactions, you do not need to worry about them. Larry On 9/13/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: hello i have the bellow code and my fisrt quiestion is where must i

Re: defaultMap: reuse resultMap for std CRUD

2005-09-13 Thread Larry Meadors
Hey Ron, where is that code in the .net version? I would like to get this done... Larry On 9/13/05, Ron Grabowski [EMAIL PROTECTED] wrote: The .Net port of ibatis supports a generate tag: update id=Update parameterMap=update-generate-params generate table=Categories by=Category_Id/

Re: N+1 select and object references

2005-09-15 Thread Larry Meadors
I see - it sets the list empty, then populates it, but you are relying on the setter to be supplied a full list because it processes the list and manipulates the object at that point. Editorial comment: Having get/set methods do processing is always risky, and should ALWAYS be avoided if the

Re: dynamic conditions problem

2005-09-16 Thread Larry Meadors
I'd guess because the sql not properly ended, but without some more troubleshooting it will be almost impossible to solve. :-) Write a unit test to reproduce the failure. Then start cutting stuff out until it works. The last thing you remove will be the one that is broken. Odds are that you'll

Re: Loading SqlMaps relative to SqlMapConfig.xml

2005-09-18 Thread Larry Meadors
In a properties file, referenced useing the property tag... On 9/18/05, Dionisio Egiluz Ruiz de Zárate [EMAIL PROTECTED] wrote: and where do you declare the baseURL variable? where do you put it the value? thanks - Original Message - From: Clinton Begin To:

Re: Escaping the PLUS character in selects

2005-09-18 Thread Larry Meadors
Did you try So_PN_duoc_tiem_UV2+? If that doesn't work, hunt down the guy who used a + in a column name, and wring his...errr, nevermind. ;-) Larry On 9/18/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: hey, Im having a problem when trying to select a field with a PLUS character. My select

Re: Mapping Composition (aka composite property, aka value objects)

2005-09-19 Thread Larry Meadors
Can you explain more how the model is in Java, and in the database? Larry On 9/19/05, Dan Bradley [EMAIL PROTECTED] wrote: I have one entity, a Product, which holds a Price as a composed (not related) entity. A Price is a numeric value and a currency code as a String. Prices don't have a

Re: Dynamic condition/fields

2005-09-20 Thread Larry Meadors
On 9/20/05, Ron Grabowski [EMAIL PROTECTED] wrote: Q3. All sql statements to/from the database are logged. You can capture those and do whatever you want with them. I think what he's looking for here is a way to get the SQL before it is executed to tweak it. No, there is not currently a way

Re: Dynamic condition/fields

2005-09-20 Thread Larry Meadors
Honestly, I can say in the 3 years (?!) i have been using iBATIS, I have never needed to do that..but at the same time, I can see where it might be useful. I can see a MUCH larger use in this way - I spent last weekend writing a DAO implementation for an LDAP directory...LDAP queries are every

Re: Question on SQLMaps

2005-09-23 Thread Larry Meadors
The key there is this: There is already a statement named getId in this SqlMap. As others have mentioned, you have to make the names unique, or enable namespaces. I would suggest using namespaces. It makes things much cleaner in terms of organization. Larry On 9/23/05, Dave, Rajeev [EMAIL

Re: Hibernate integration

2005-09-25 Thread Larry Meadors
The Hibernate integration is in the DAO layer, not in SQL Maps. So, it allows you to insulate your application from any APIs specific to Hibernate. It does not make it possible to use both at the same time (something I have done in the past, and would advise against). Larry On 9/24/05, Michael

Re: caching... per select?

2005-09-25 Thread Larry Meadors
Caching in iBATIS is based on the statement and the parameters passed to it. So, if you execute select * from Account where id = ? three times, with 3 different id parameters, you'll get 3 cache entries. If you execute select * from Account where name = ? with the name of one of those three, you

Re: Caching; how do I know it's working?

2005-09-25 Thread Larry Meadors
Nope. On 9/25/05, Michael Campbell [EMAIL PROTECTED] wrote: Is a cache hit/miss logged? I've run a test of running the same select in a loop, and my ibatis log4j output shows n copies of the prepared statement, result set operations happening. Is the logging supposed to distinguish between

Re: Caching; how do I know it's working?

2005-09-26 Thread Larry Meadors
There are some APIs for getting this info..I have not used them yet, but will be looking at them in the next 2-3 weeks. Larry On 9/26/05, Niels Beekman [EMAIL PROTECTED] wrote: If we can't distinguish between DB-hits and cache-hits, how are we supposed to debug the cachemodels? I vote +1

Re: the systems cannot load the resource files

2005-09-27 Thread Larry Meadors
This line is wrong: Resources.getResourceAsReader(../../resources/daoConfig.xml); Resources are absolute names based on the classpath. So, if you put your daoConfig.xml file in a resources package, you would use this instead: Resources.getResourceAsReader(/resources/daoConfig.xml); Larry On

Re: Passing logged in Username and password to iBATIS

2005-09-27 Thread Larry Meadors
I have been down that path, and used proxool to do it. I would *not* recommend doing this. It will be easier to change the procedures to allow passing in the user id. We did something similar, in that we made them default to USER if a user parameter is not passed in, and if the user is the

Re: MS Access selectKey question

2005-09-28 Thread Larry Meadors
Uhm, I do not think you can execute two statements with the same connection using the jdbc-odbc bridge. Is using Access a hard requirement for you? If it is, you need to find a real JDBC driver, which may mean you need to buy a commercial driver for it. Larry On 9/28/05, Michael Campbell

Re: N+ 1 selects

2005-09-28 Thread Larry Meadors
Give us a stack trace, too, please. Larry On 9/28/05, John Chien [EMAIL PROTECTED] wrote: Dear Sir: I follow the FAQ to fix the N+1 selects, However, I continue get the compilation error. My xml looks like: ?xml version=1.0 encoding=UTF-8 standalone=no? !DOCTYPE sqlMap PUBLIC

Re: xml

2005-09-29 Thread Larry Meadors
Well, yes it sort of can. It will return one xml DOCUMENT per object - if you want one object as XML, you can easily do that. If you want a list of objects as a single xml document, you have to do that yourself... Larry On 9/29/05, Guido García Bernardo [EMAIL PROTECTED] wrote: yes, it can.

  1   2   3   4   5   6   7   8   9   10   >