Re: interface property predicaments

2006-07-10 Thread Paul Benedict
One thing I forgot to mention: the "Article" class listed in my sqlmap is a typeAlias to the actual implementation. Don't think I am trying to construct an interface :-)Paul Benedict <[EMAIL PROTECTED]> wrote: I have two interfaces: Article and Person. My problem is with my Article implementation:p

interface property predicaments

2006-07-10 Thread Paul Benedict
I have two interfaces: Article and Person. My problem is with my Article implementation:public interface Article {  public Person getPerson();}public class ArticleImpl extends Article {  private Person person;  public Person getPerson() {    return person;  }  public void setPerson(Person person) {

Re: Dynamic Order By

2006-07-10 Thread Jeff Butler
You can add this to your select statement:         order by $orderByColumn$      Then add a getOrderByColumn() method to your parameter object.   Jeff Butler  On 7/10/06, Nicolas Duroc <[EMAIL PROTECTED]> wrote: yes, you're right, sort the table by _javascript_ or java would be better, butI'm

Re: Isolation level support at the DAO framework level ...

2006-07-10 Thread Jeff Butler
I don't know why it wasn't done in the 2.0.9 time frame, but I've been looking at it due to your JIRA ticket.  The truth is that this isn't that easy to do.  The DAO framework supports DAOs for iBATIS SqlMaps, Hibernate, Toplink, OJB, etc.  It is not so easy to set the isolation level programmatica

Re: Dynamic Order By

2006-07-10 Thread Nicolas Duroc
yes, you're right, sort the table by javascript or java would be better, but I'm pretty lazy and the SQL solution is easiest :-p. Moreover, it's a local application with no massive data, and I don't think that the SQL queries slow the server. However, I could in the future have to do it in a better

Re: Dynamic Order By

2006-07-10 Thread Nathan Maves
Just a thought but I would not query the DB every time you need to re- sort your table. I would do all of the sorting in plain old java, or better yet why not do it client side via javascript? Nathan On Jul 10, 2006, at 2:25 PM, Nicolas Duroc wrote: Hello, I have a jsp page who displays

Dynamic Order By

2006-07-10 Thread Nicolas Duroc
Hello,   I have a jsp page who displays a table of objects, and I would like to sort the table in function of the columns, I use so an "order by".I tried to use a select with the "ordered column" in parameter in the SQL Map, but it didn't work. The "ORDER BY" was not "executed". I found few explana

Re: Why is parameterMap processing positional?

2006-07-10 Thread Jeff Butler
For this reason we recommend using inline parameters rather than parameter maps.  They are just as functional, and more intuitive.   Jeff Butler  On 7/10/06, Merritt, Norris <[EMAIL PROTECTED]> wrote: It seems to me that if I have a parameterMap of type map, with various named values in the map

Why is parameterMap processing positional?

2006-07-10 Thread Merritt, Norris
It seems to me that if I have a parameterMap of type map, with various named values in the map, and associate this parameterMap with a statement, I should be able to specify placeholders in the statement of the form #foo#  and #bar#  where ‘foo’ and ‘bar’ match names of values which exist i

Re: Abator regeneration causes duplicated methods

2006-07-10 Thread Jeff Butler
I've tested on Eclipse 3.2 (Windows) and I'm not seeing this behavior - a regeneration works fine for me.  So, here are some questions:   1. Are the duplicated methods in the DAOs, the model objects, or both?   2. Did the JavaDoc comments get stripped off the methods somehow before calling Abator? 

Abator regeneration causes duplicated methods

2006-07-10 Thread Maarten Meijer
Hi Jeff, I'm using Ababator 0.6.5 on Mac OSX with Eclipse 3.2. I've disabled Oxygen to get back the 'Generate iBatis Artifacts' menu item again. I have decided to use the DAO as wll after all, so I added to the abatorConfig.xml: targetProject="fold1wt"> I then do

Re: RE : selectByExample

2006-07-10 Thread Jeff Butler
No, it takes two methods calls.  The next version of Abator will generate much more intuitive and functional example methods.  I'll release it as soon as iBATIS 2.2.0 is released.   Jeff Butler   On 7/10/06, jeremy jardin <[EMAIL PROTECTED]> wrote: Ok thx !!   So, by the way, is it possible to

RE : selectByExample

2006-07-10 Thread jeremy jardin
Ok thx !!   So, by the way, is it possible to set that indicator using one method ? Something like ‘criteria.setMobile (“x”, “UtilisateurExample.EXAMPLE_EQUALS) ‘ ??       -Message d'origine- De : Jeff Butler [mailto:[EMAIL PROTECTED] Envoyé : lundi 10 juillet 2006 15:33

Re: selectByExample

2006-07-10 Thread Jeff Butler
With the current version of Abator you do need to specify how the criterion will be applied.  So your code should look like this:  UtilisateurExample criteria = new UtilisateurExample() ; criteria.setMobile ("06"),criteria.setMobile_Indicator(UtilisateurExample.EXAMPLE_EQUALS );Jeff Butler

Re: Table names as parameter

2006-07-10 Thread Ted Schrader
Hi Serafin, Also, when using Torsten's suggestion, be sure to consider if you will need to remap your results. The remapResults attribute is explained here: http://opensource.atlassian.com/confluence/oss/pages/viewpage.action?pageId=3057 Ted On 10/07/06, Torsten Michelmann <[EMAIL PROTECTED]>

Re: How to use a function on a parameter in an "update" mapped statement?

2006-07-10 Thread Ted Schrader
Hi Fred, Does mySQL allow place holders inside of functions for JDBC? For example: update jobs set clientid=?, summary=?, jobduedate=str_to_date(?) where jobid=? I ran into a similar problem with DB2 on the AS400/iSeries/i5. Check out the last entry on http://opensource.atlassian.com/conf

selectByExample

2006-07-10 Thread jeremy jardin
Hi,     I’m trying to use Ibatis in my application. I’ve also used Abator plugin to generate my javabeans and xml files.   Today, I’m writing a bean Manager, used to store/delete/update datas in database. I want to write methods able to give list according to the beanExample.   Whe

Re: Table names as parameter

2006-07-10 Thread Torsten Michelmann
Hi, have a look at http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+pass+in+a+dynamic+table+name+-+or+other+uncommon+parameters Basically use $tableName$. This will change the SQL statement before the prepared Statement is created. Original-Nachricht Da

Table names as parameter

2006-07-10 Thread Serafín Orillán Chaparro
Is there any way to pass the very table names as parameters, to be able to do something like this: SELECT ID, NAME FROM #tableName# ? Thanx! -- Serafín Orillán Chaparro Isotrol S.A. Avda. de la Innovación 1, 3ª planta +34 955 036 800 e-mail: [EMAIL PROTECTED]

Re: many-to-many relationship practice

2006-07-10 Thread Dodo
Thanks Eric. As I suspect. :)   Sam - Original Message - From: Eric Tan To: user-java@ibatis.apache.org Sent: Monday, July 10, 2006 8:45 PM Subject: Re: many-to-many relationship practice Hi,There should not be any association class in your domain model. Y

Isolation level support at the DAO framework level ...

2006-07-10 Thread Eric Tan
HiSince 2.0.9, the SQL Maps framework has the ability to specify isolation level per transaction, eg: sqlMap.startTransaction(Connection.TRANSACTION_REPEATABLE_READ); However, using the DAO framework, there is still no way to specify an isolation level using DaoManager.startTransaction(). Jus

Re: many-to-many relationship practice

2006-07-10 Thread Eric Tan
Hi,There should not be any association class in your domain model. Your domain model should be independent from your data model.Your code would look like your second option, but your might use the entire category object as input:Add item to category...CategoryDao.saveCategory( category ); Then crea