Su-bloody-perb mate!!!
Â
This is exactly what I need as I now don’t have to worry about calling a gateway method to obtain a recordset and thus the size of a related collection.
Â
Really clever thinking Mark.. Love it!
Damn right, this is a superb addition, I’ll suck down the SVN a little later and give it a shot.
Â
What I love best is that this shouldn’t require any changes, apart from the XML, right?
Â
Nice work Mark, well done.
Â
Rob
Awesome!
> *** This is a ColdFusion 8.0.1 only release ***
Do you mean it will no longer work on CFMX7 or do you just mean it
won't work on CF8.0.0? (I understand that proxies will not work on
CFMX7).
> Only when a method is called on the Proxy that requires data it doesn't know
> about is called on it, will it load up the TranferObject it represents.
Could you expand on this a little? Suppose I have a decorator. Can I
call my decorator methods without it loading data (as long as those
methods in turn do not call an underlying getter/setter)? Just trying
to get clarity on what exactly triggers the load... all generated
get*() and set*() methods? Anything else? Since the proxy has the PK,
does calling getId() - or whatever method binds to the PK - cause a
data load? I'd hope not.
I think this is an excellent enhancement and I can imagine using
lazy="false" proxied="true" a lot.
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
> *** This is a ColdFusion 8.0.1 only release ***Do you mean it will no longer work on CFMX7 or do you just mean it
won't work on CF8.0.0? (I understand that proxies will not work on
CFMX7).
Could you expand on this a little? Suppose I have a decorator. Can I
> Only when a method is called on the Proxy that requires data it doesn't know
> about is called on it, will it load up the TranferObject it represents.
call my decorator methods without it loading data (as long as those
methods in turn do not call an underlying getter/setter)? Just trying
to get clarity on what exactly triggers the load... all generated
get*() and set*() methods? Anything else? Since the proxy has the PK,
does calling getId() - or whatever method binds to the PK - cause a
data load? I'd hope not.
OK, I'll rephrase that: does this mean Transfer no longer supports
CFMX7 at all? (or is this just for the proxy functionality?)
(It doesn't bother me since I'm on 8.0.1 - except for one server I've
been meaning to rebuild which is on 8.0.0 - but I thought there were
still some Transfer users on CFMX7?)
> If you are using a Decorator:
>
> TransferObjectProxy -loads->Decorator -contains->TransferObject
Ah, so *any* method call will force a load even if it doesn't actually
"need" to? (excepting the ones listed below)
> getPrimaryKeyValue() - the TOP stores the primary key value, so it knows
> about it, so it won't be loaded.
Hmm, is this a new method in Transfer 1.1? Is it only on the proxy or
is it generated into the TO as well? Seems like a useful addition and
I could see writing code that relies on this to avoid loading objects
behind a proxy...
> Finally, the TOP knows about any properties that are used on it either as a
> struct key, or as a ordering property, so if the TOP is used in a collection
> that is order by 'Foo', calling getFoo() on the TOP will not cause a load,
> as it already has that information.
OK, that's sweet.
> Side note: please do realise that CFC creation and population does not have
*not*?? I assume that was a typo...
> its expense, so even if you are creating 1,000,000 TO proxies, it may well
> be slow. So still load test, and make sure that it performs well, etc.
OK, I'll rephrase that: does this mean Transfer no longer supports
On Wed, Jul 2, 2008 at 3:08 PM, Mark Mandel <mark....@gmail.com> wrote:
> This means it won't work on CF7, or CF8, only CF8.0.1.
CFMX7 at all? (or is this just for the proxy functionality?)
(It doesn't bother me since I'm on 8.0.1 - except for one server I've
been meaning to rebuild which is on 8.0.0 - but I thought there were
still some Transfer users on CFMX7?)
Ah, so *any* method call will force a load even if it doesn't actually
> If you are using a Decorator:
>
> TransferObjectProxy -loads->Decorator -contains->TransferObject
"need" to? (excepting the ones listed below)
Hmm, is this a new method in Transfer 1.1? Is it only on the proxy or
> getPrimaryKeyValue() - the TOP stores the primary key value, so it knows
> about it, so it won't be loaded.
is it generated into the TO as well? Seems like a useful addition and
I could see writing code that relies on this to avoid loading objects
behind a proxy...
*not*?? I assume that was a typo...
> its expense, so even if you are creating 1,000,000 TO proxies, it may well
> be slow. Â So still load test, and make sure that it performs well, etc.
Mark
A COBOL programmer, a FORTRAN programmer and a Smalltalk programmer
walked into a bar...
Just j/k :)
OK, that's what I *hoped* you meant :)
> I meant it as 'whatever the method is that get's generated from your <id>
> element'.
>
> so if you have <id name="fooid" ... />
>
> and you call getFooID() on the TOP, it won't load the object.
Thanx for the clarification. Again, that's what I *hoped* you meant :)
I'm wondering if this is similar to the <compsoiteid> bug that Philip
got a while ago:
http://groups.google.com/group/transfer-dev/browse_thread/thread/47d3a1f5aa591f07
What was the error message that you got?
And what is the code you used to get the error?
Mark
Mark
-----Original Message-----
From: transf...@googlegroups.com [mailto:transf...@googlegroups.com]
On Behalf Of Sean Corfield
Sent: 03 July 2008 22:40
To: transf...@googlegroups.com
Subject: [transfer-dev] Re: First Pass: TransferObjectProxies in SVN
Have a play with it, and let me know if you find any more issues.
Mark
Jon, what error message do you get?
If something goes wrong, I need to know the error message... it saves
me hours of time ;o)
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
Mark
| Test | testMesserNonLazyProxy(test.transfer.cases.proxy.ProxyTest) |
| Message | Element tbl_A is undefined in a CFML structure referenced as part of an expression. |
| Type | Expression |
| Tag Context |
|
I'm getting the same thing, so now I know that we're on the same page.
Mark
That should be fixed.
Thank for your effort in testing this stuff out. The number of
combinations in which these things can be used makes testing every
single combination tricky (especially when you add in composite keys).
Mark
Cloning has been tested, so feel free to Proxy Away!
Mark