N+1 Null value objects

View: New views
5 Messages — Rating Filter:   Alert me  

N+1 Null value objects

by Sparecreative :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

N+1 Null value objects 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 familiar? If somebody could point out the solution to my memory lapse I’d be extremely grateful.

TIA
Z.

Re: N+1 Null value objects

by David Brown-48 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello, I just finished reading about N+1 in the IBatis doco. HTH.

----- Original Message -----
From: "Zoran Avtarovski" <zoran@...>
To: "iBatis Java Mail List" <user-java@...>
Sent: Tuesday, June 23, 2009 12:04:18 AM GMT -06:00 US/Canada Central
Subject: N+1 Null value objects

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 familiar? If somebody could point out the solution to
my memory lapse I¹d be extremely grateful.

TIA
Z.

Re: N+1 Null value objects

by Jeff Butler-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This maybe?


Jeff Butler


On Tue, Jun 23, 2009 at 12:04 AM, Zoran Avtarovski <zoran@...> wrote:
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 familiar? If somebody could point out the solution to my memory lapse I’d be extremely grateful.

TIA
Z.


Re: N+1 Null value objects

by Sparecreative :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Re: N+1 Null value objects Bingo. Thanks Jeff.

Now the hard part, the DTD at http://ibatis.apache.org/dtd/sql-map-2.dtd hasn’t been updated to include the notNullColumn property so Tomcat is complaining.

Do you know if it’s an oversight and the DTD is going to be updated or should I point to a local version?

Z.

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 <zoran@...> wrote:
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 familiar? If somebody could point out the solution to my memory lapse I’d be extremely grateful.

TIA
Z.




Re: N+1 Null value objects

by Jeff Butler-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It was an oversight.  I've updated the Apache site - it will be available with the next site refresh (in about an hour).

Jeff Butler


On Tue, Jun 23, 2009 at 6:56 PM, Zoran Avtarovski <zoran@...> wrote:
Bingo. Thanks Jeff.

Now the hard part, the DTD at http://ibatis.apache.org/dtd/sql-map-2.dtd hasn’t been updated to include the notNullColumn property so Tomcat is complaining.

Do you know if it’s an oversight and the DTD is going to be updated or should I point to a local version?

Z.

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 <zoran@...> wrote:
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 familiar? If somebody could point out the solution to my memory lapse I’d be extremely grateful.

TIA
Z.