Hello,
Can anybody recommend articles or books which cover Ibatis in more depth
that the "quick start" guides that are linked to from the site?
For example -- I am interested in learning how to chain resultMaps
together; I realize that I can use "select" within resultMap to chain onto
another que
Doh, found the developer guide. That has what I need for now.
> Hello,
>
> Can anybody recommend articles or books which cover Ibatis in more depth
> that the "quick start" guides that are linked to from the site?
>
> For example -- I am interested in learning how to chain resultMaps
> together; I
Hello,
I have tables A, B and C, which are related via table A_B_C:
A:
a_id
B:
b_id
C:
c_id
A_B_C:
a_id
b_id
c_id
I have beans representing A, B & C, but I would like to avoid having a
bean representing A_B_C. That is, A (the owner) would ideally have
instances of B & C, ideally mapped in a h
Sorry if I was unclear.
A is a parent object which owns B and C children. A has a certain set of
Bs each mapped against a set of Cs. A:B is many to many. B:C is many to
many. A:C is many to many.
For the interim I am using ResultMaps to build an inner class (BC) of A,
which holds one B and a list
#1 -- I'm trying to use selectKey to create keys for me. DB is Sybase.
My insert is as follows:
INSERT INTO Deployment (environmentId, deploymentTypeId, userName,
deploymentStatusId, deploymentTime, threadCountOverride)
VALUES (#environmentId#, #deploymentTypeId#, #userName#,
BTW, this *does* work:
SELECT MAX(deploymentId) + 1 FROM Deployment
INSERT INTO Deployment (deploymentId, environmentId,
deploymentTypeId, userName, deploymentStatusId, deploymentTime,
threadCountOverride)
VALUES (#dep
Hello,
Using resultMaps, I can load sub-objects of a particular object
automagically, using the "select" attribute. E.g.
Is there a converse construct for saving objects? I.e., if I were to save,
can I do something like:
?
Or is the best way to iterate through subobjects on the java side of
Is supporting this a planned future feature? Just curious.
Thanks
> The only way is to iterate through subobjects on the java side of
> things and explicitly make sqlMap insert calls.
>
> Larry
>
>
> On 10/11/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> Hello,
>>
>> Using resultMaps, I ca
If I understand you correctly, you can do something like this:
class Foo extends SqlMapClientDaoSupport {
public Foo(DataSource ds) {
super.setDataSource(ds);
ClassPathResource cpr = new
ClassPathResource("com/foo/dao/ibatisSQLMapsConfig.xml"); /*
spring class*/
SqlMapC
Hello, I am doing the following within one transaction:
createJob(Job job);
[somewhat heavy calculations that don't belong in the batch]
begin batch:
createDeployment(Deployment deployment);
...
end batch;
My problem is that after the batch is run, the deployment has the job's
id. (Th
You can do this.
Does your settings have useStatementNamespaces? E.g.
Are you sure you have imported both of your sqlMaps in your config? e.g.
What error are you seeing, otherwise?
> Hey All,
>
> I was hoping that I would be able to use the namespace feature to refer to
> a
> select in a
What's going on here? I'm using Spring's transactions, not the Ibatis ones.
java.lang.NullPointerException
at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.endTransaction(SqlMapExecutorDelegate.java:776)
at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.endTransaction(SqlM
I found one reference to this:
http://www.google.com/search?q=cache:y2UKgchz25IJ:mail-archives.apache.org/mod_mbox/incubator-ibatis-user-java/200502.mbox/%253C16178eb10502262030d30d080%40mail.gmail.com%253E+at+com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.endTransaction(SqlMapExecutorDelega
If I turn lazy loading on, it is throwing an NPE from one specific sqlmaps
query. The other queries & inserts work correctly.
When I posted this problem last week, I misdirected attention by
theorizing that this had something to do with the fact that I'm using
spring transactions; I'm pretty sure
Hello, I found that the cache doesn't behave exactly as I'd have expected;
I'm using an LRU cache. Is there a way that I can configure it to behave
as I'd like?
I have a hierarchical object tree, mapped using ResultMaps:
...
...
I am caching A. It looks like all of the Bs that belong to A
Are there any good strategies for using enums w/ Ibatis? Are there plans
to directly support them, if not?
I have been forcing my enums (which represent valid values of certain
columns, e.g. status columns) to have a value(), e.g.:
public enum Status {
...
COMPLETE { public In
Tiz indeed. Thanks
> I think this is just what you are looking for.
>
> http://opensource2.atlassian.com/confluence/oss/display/IBATIS/How+do
> +I+use+a+Custom+Type+Handler+with+complex+property+or+Type+Safe
> +Enumeration
>
> Nathan
>
> On Oct 28, 2005, at 1:25 PM, [EMAIL PROTECTED] wrote:
>
>> A
I am passing queryForList an ArrayList of Status, which is an Enum I
defined. I have registered a typeHandler for Status, as previously
discussed today on the list. The typeHandler works when querying for a
single object.
However, when querying for list, it gives the following exception: (See
belo
Agh, confused myself.
Let me clarify: the exception happens if I call queryForList with a
List as the parameter. If I call queryForList with an Enum as the
parameter, no problem.
> I am passing queryForList an ArrayList of Status, which is an Enum I
> defined. I have registered a typeHandler for
Hi Clinton, this is actually use case based.
Let me put *example* names to my tables to illustrate:
Vendor / Branch / Employee / Address
When I load a Vendor, I wish (if at all possible) to load it from the
cache, since it contains all sub objects (Branch, Employee, Address), and
is rather big.
Is this a bug, or am I doing something wrong?
Here's my insert statement.
INSERT INTO Deployment (
environmentId, deploymentTypeId, deploymentStatusId,
deploymentTime
,threadCountOverride
) VALUES (
#environmentId#, #deploymentTypeId#,
Thanks. I added the stacktrace to the JIRA issue.
The experiment didn't work.
BTW, my workaround currently is to use the nullValue syntax inline, which
works fine.
> Hello,
>
> We'll need a stack trace. Just for kicks though, try specifying the type
> explicitly:
>
> #deploymentStatusId:NUMERIC#
22 matches
Mail list logo