[jboss-user] [EJB/JBoss] - JBossQL IS EMPTY not acting correctly

vandelay do-not-reply at jboss.com
Thu Nov 15 19:09:59 EST 2007


All,

I am using JBossQL to query a UsersEB. Previous versions of my application I had a Image <1:1> Users CMR relationship. This was updated so that a User can have more than one image; therefore Image <N:1> Users. So the change is instead of returning one Local instance of Image (ImageLocal) it will now return a Collection  for each User

For the particular query I am having trouble with, previous version had something similar to

SELECT OBJECT(u) FROM Users u WHERE u.Image IS NULL

And this worked correctly.

In my current  query:

SELECT OBJECT(u) FROM Users u WHERE u.Image IS EMPTY

Does not work because in my result set, I do not get Previous version application created users that were NULL as well as Current Version application created users where their Image is EMPTY. 

There is no longer a CMR field present in Users and now the CMR field in Image is UserID, which is the PK of Users

My Thinking:

-  The old users were created under different circumstances therefore when             changed to a N:1 relationship, they no longer were NULL but were altered to "" (Empty string in place of NULL).

-Since the application change, Users and Image will need to be recreated for my application to fully understand the new CMR.

I wanted to get some input from posters before I go this long route.


Thanks,

Blake

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105283#4105283

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105283



More information about the jboss-user mailing list