Fixing wasNull() in Railo (3.3.0.027)

81 views
Skip to first unread message

Sergii Galashyn

unread,
Sep 3, 2011, 3:33:06 AM9/3/11
to transf...@googlegroups.com
Here's the ticket and discussion https://issues.jboss.org/browse/RAILO-1450

I'm trying to use the proposed workaround to replace wasNull, but I'm not quite sure I'm invoking it properly.

Here's the function:

function isQueryCellNull(required query qry,required string columnName, required numeric row) {
     return isNull(qry.getAt(columnName, row, nullValue()));
}

So, idea is to replace this

if(arguments.query.wasNull())

with this

if(isQueryCellNull(arguments.query, arguments.property.getColumn(), xxxxx))

But I'm not sure about row agrument. How can I get it in context of getPropertyColumnValue method? 

Thanks,
-sg

Robert Rawlins

unread,
Sep 3, 2011, 5:35:51 AM9/3/11
to transf...@googlegroups.com
HI Sergi,

I was the one that opened the initial ticket with Railo, I was hoping they'd fix it properly but they don't have any immediate plans too which is a shame, I have a bunch of Transfer based apps I'm itching to migrate but they're all broken on Railo at the moment as it doesn't handle null values properly.

I'm happy to take a look at implementing this method, I don't have time at the moment though, I will take a look on Monday though.

Robert

--
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
 
Try out the new Transfer ORM Custom Google Search:
http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8
 
You received this message because you are subscribed to the Google Groups "transfer-dev" group.
To post to this group, send email to transf...@googlegroups.com
To unsubscribe from this group, send email to transfer-dev...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/transfer-dev?hl=en

Sergii Galashyn

unread,
Oct 10, 2011, 5:34:07 AM10/10/11
to transf...@googlegroups.com
Just to have this discussion complete (kind of) in case someone finds it with same issue, here's the workaround for Railo 3.3 users.

Edit /com/sql/SQLValue.cfc

Replace

if(isQueryCellNull(arguments.query, arguments.property.getColumn(), arguments.query.currentRow))

with

if(!isDefined("value"))

-sg

Robert Rawlins

unread,
Oct 10, 2011, 5:37:55 AM10/10/11
to transf...@googlegroups.com
Hi SG,

Thanks for posting this work around.

People who impalement this will still need to do lots of testing on their app, as although no exceptions were thrown by older versions of Railo the NULL functionality of transfer was _not_ working properly.

So, even with this fix in place, people will likely get unexpected, differing behaviour to what they were getting with earlier versions of Railo.

Thanks.

Rob

Sergii Galashyn

unread,
Oct 10, 2011, 5:43:38 AM10/10/11
to transf...@googlegroups.com
Yes, you are correct. That's why I've called this "workaround", not "solution" :)

Nulls were not working in Railo any way, so our aim was to make Transfer just work with new Railo as previously.

Personally for me it seems to work fine, which is good enough for legacy apps.

Thanks,
-sg


10.10.11 12:37, Robert Rawlins написав(ла):

Robert Rawlins

unread,
Oct 10, 2011, 5:45:57 AM10/10/11
to transf...@googlegroups.com
Good stuff, I thought I'd just post that for other peoples reference.

I've not had much luck with Railo and Transfer, even with the WasNull fix I get a chain of other problems, which is a shame. But as you say, for legacy apps I can't complain too much :-)

Thanks.

Rob
Reply all
Reply to author
Forward
0 new messages