I've encountered a couple of times when I've been doing a lot of dynamic sql
and would have liked to preserve the newlines in the sql. Makes it easier to
understand what the problem is when I copied and pasted the text into a
database management program.
What about a global setting that defaul
Someone should make a list. I know the .Net version has an "extends" attribute
on nodes that the Java version doesn't have. You can accomplish
similiar functionality using and nodes.
- Original Message
From: Edwin S Lukaweski
To: user-java@ibatis.apache.org
Sent: Saturday, Dece
For .Net there is Sooda:
http://www.sooda.org/
Its a BSD license.
- Original Message
From: Ted Husted <[EMAIL PROTECTED]>
To: user-java@ibatis.apache.org
Sent: Friday, December 16, 2005 12:27:25 PM
Subject: [OT] ORMs under the Apache License
I think most of us agree that sometimes you
parameterClass
--- Hendry <[EMAIL PROTECTED]> wrote:
> Hi, I got this error when running my application :
>
> Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error
> parsing XML. Cause:
> com.ibatis.common.exception.NestedRuntimeException:
> Error parsing XPath '/sqlMapConfig/sq
of the property. If
there are 50 people and each person has 5 addresses with pictures, I
shouldn't populate those fields if I'm never going to use them on the
list page that just shows first names and street names. The
PersonAddress object comes in handy for that...
--- Ben Munat <[EMA
I've been discussing design patterns (mainly for web sites) with a
colleague over the last couple days and my brain is fried with trying
to come up with quick answers. Here's some of the things that we've
talked about. Hopefully people will share their two cents on these
issues...
A common pattern
+1
That's exactly what I do too.
--- Larry Meadors <[EMAIL PROTECTED]> wrote:
> I generally name my key fields uniquely, but leave the others what
> they are, for example:
>
> create table Fruit (
> fruitId int,
> name varchar(30)
> )
>
> Then if I join to another table with a "name" fiel
y could you not just put this logic into your POJO.
>
> example
>
> public void setThePropertyThatNeedsToBeTrimmed(String property) {
> this.property = property.trim();
> }
>
>
> On Oct 26, 2005, at 10:23 AM, Ron Grabowski wrote:
>
> > Custom type
t that tomorrow- The
> sqlmapconfig dtd does have a typehandler child..
>
> Cheers
>
> -Original Message-
> From: Ron Grabowski [mailto:[EMAIL PROTECTED]
> Sent: 26 October 2005 17:13
> To: user-java@ibatis.apache.org
> Subject: RE: calling trim() on sql map retu
IBatisNet has support for replacing the built-in type handlers:
TrimStringTypeHandlerCallback could be implemented in such a way that
it automatically calls trim() before sending values to the database.
You could continue to use the normal #property# syntax without having
to specify the ty
The property attribute is valid in IBatisNet. For Java, try
keyProperty:
SELECT curval('persons_id_seq')
Unless I missed something, the iBATIS-SqlMaps-2.pdf file from 5/5/2005
didn't mention keyProperty anywhere.
This should also work:
Person aPerson = new Person();
aPerson.setFirstname
I personally like the PDF documentation. I think the wiki is good for
one off examples or learning about a specific part of iBATIS. The PDF
seems to flow together more like a good book. After I'm done reading a
section I usually continue reading the next section. After 15min or so
I find that I've
, its execution time, and its cache
hit percentage.
--- Michael Campbell <[EMAIL PROTECTED]> wrote:
> I would, but I'm a metrics freak.
>
>
> On 9/26/05, Ron Grabowski <[EMAIL PROTECTED]> wrote:
> > IBatisNet has a GetDataCacheStats method on the main sqlM
IBatisNet has a GetDataCacheStats method on the main sqlMapper object
that outputs a simple summary of statements and their cache hit ratio:
User.GetMany: 51%
User.GetOneById: 20%
User.GetManyById: No cache.
...
Maybe this is a feature that the Java people would find useful.
--- Michael Camp
it is sent to the execution engine.
>
>
> Thanks
>
>
> --- Ron Grabowski <[EMAIL PROTECTED]> wrote:
>
> > Q1.
> > You could pass your parameters in as a Map and use a
> > literal:
> >
> >
> > FIELD1 $likeClause$ #attribute1#
> >
Q1.
You could pass your parameters in as a Map and use a literal:
FIELD1 $likeClause$ #attribute1#
Q2.
You could use a literal for this as well. Remember that ibatis isn't a
sql parser, it doesn't know anything about your column names. It sees
everything as text so there's nothing like thi
If you define a global property, you should be able to do something
like this:
You could place the additional values into a Map along with the object
and pass that into the statement:
map.put("truckOrderType", getTruckOrderTypeValue());
map.put("orderType", getOrderType());
--- Prashant
; Larry
>
> On 9/13/05, Ron Grabowski <[EMAIL PROTECTED]> wrote:
> > The .Net port of ibatis supports a generate tag:
> >
> >
> >
> >
> >
> > That will automatically generate a generic:
> >
> > UPDATE Categories SET...
> &g
The .Net port of ibatis supports a generate tag:
That will automatically generate a generic:
UPDATE Categories SET...
sql statement. I believe it also supports generating DELETE and SELECT
statements.
Perhaps you can look into porting this code to the Java version.
--- Joachim Hoffman
You could create different property files per each vendor that contain
database specific things (like the select key statement, GETDATE() ,
etc.) and use it this way:
${SELECT_KEY}
Some people use this property syntax to group database specific sql
maps:
A colleague of mine suggeste
I discovered the IBatisNet is the same way IBATISNET-87 :( One of the
contributing factors may be that there isn't an easy way to check if
the same row handler has been passed in on subsequent calls to
QueryWithRowsHandler. If the same parameters and row handler has been
passed in, then the value
It should be possible to reference a resultMap in another file if you
use the complete namespace. Have you tried that?
--- [EMAIL PROTECTED] wrote:
>
> Is there a way to embed result maps within parent result maps? The
> reason I
> ask is that I have found that for large projects, SqlMaps can be
unds like this is strictly to determine if the XML is
> well-formed and valid. The trick is determining if the XML matches
> the
> DB schema, which is a far more difficult (infinitely more difficult?)
> problem.
>
> -ed
>
> On 7/22/05, Ron Grabowski <[EMAIL PROTECTED]&g
In the 1.x releases, there was a XmlSqlMapValidator class that could
validate the maps at compile time:
ibatis_db_guide-1-2-9.pdf
"
Validation
While your developing your application, it is probably quite
inconvenient to start up your app server just to test your SQL Maps.
For this reason, a separ
I think a more conventional approach will be taken (i.e. you'll be able
to order it on Amazon or buy it in a book store). A lot of book
publishers offer discounts if you download the book in PDF format from
them. Hibernate in action is $44 from Manning and $22 in PDF.
--- netsql <[EMAIL PROTECTED]
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]> wrote:
> Thanks Clinton,
>
> I will look into this myself when I have more time. I wish there we
Does it work if you change the first result node to:
or
--- "Rao, Satish" <[EMAIL PROTECTED]> wrote:
>
> I get an UncategorizedSQLException when I execute the
> 'listRunDetails'
> select statement shown below. The query is a join between two tables.
> Am
> I doing something wrong here?
>
I remember experiencing a similiar problem with Eclipse and Tomcat. It
seemed that whenever I deployed, Tomcat wouldn't recognize that files
had changed and it would never reload the application. I recall being
frustrated when I made small changes to sqlMap xml files and I had to
completely shutdow
select * from $value$ where TheStatus = 'ACTIVE' and type = COLOR
--- Folashade Adeyosoye <[EMAIL PROTECTED]> wrote:
> Such as
>
>
>
> select * from #value# where TheStatus = 'ACTIVE' and type = COLOR
>
>
>
>
>
> shardayyy
>
>
>
>
>
>
I've never tried creating tables and views using that syntax but it
should work.
--- Henry Lu <[EMAIL PROTECTED]> wrote:
> It worked. Thanks for your help. Based upon your experience, do you
> know
> if this works for "create table" and "Create view&quo
I've used Tiles, Struts, and DisplayTag at the same time before. Its
possible to export a DisplayTag table when using Tiles and Struts. You
need to add a node to the web.xml file:
http://tinyurl.com/3aadr
http://displaytag.sourceforge.net/apidocs/org/displaytag/filter/ResponseOverrideFilter.html
last example is of type SqlMapClient and can be
found in the com.ibatis.sqlmap.client package.
- Ron
--- Henry Lu <[EMAIL PROTECTED]> wrote:
> What is the class of
>
> sqlMapper
>
> ?
>
> -Henry
>
>
>
> Ron Grabowski wrote:
>
> >Have you tried
Have you tried Larry's suggestion?
sqlMapper.executeUpdate("lockTable");
lock table x in shared mode
--- Henry Lu <[EMAIL PROTECTED]> wrote:
> Mr. Ruth, thank you very much for your info for me to understanding
> this
> group. I thought there is a group of expertise watching the emails
Do things get faster if you have the database index remote_id and
log_time?
--- Zoran Avtarovski <[EMAIL PROTECTED]> wrote:
> I have a quick query regarding the speed of count query I use to
> generate a
> chart, which is too slow at present and I'm looking for suggestions
> to speed
> it up.
>
The next message in the thread had a list of three cases where the
discriminator might come in handy:
* table per class hierarchy
* table per subclass
* table per concrete class
That's the answer I was looking for. I believe both the .Net and Java
version now have the same level of suppor for
35 matches
Mail list logo