On Fri, Sep 18, 2009 at 9:05 AM, C N Davies <[email protected]> wrote:
> You can read the parameter and return types from the methods to work out > what the types are. > > I meant for any given property (single or collection), you don't want to read it in if it's set to LAZY, so you would need to read the annotation on the field/getter. Maybe it's harder than that. If the field has already been loaded if LAZY, then you do want to read it in. How would you find out if a field has been loaded? You can't read the field from the "master" entity because if it's detached and unloaded field access is disabled it will crash. Ok, you could trap for that. But still, comparing to null isn't the best way if the value is nullable. Also, the master entity might be managed rather than attached, so you don't want to load a large collection marked as LAZY accidently. Am I making sense? I am interested in a generic "self-refresh" method. I think it's possible, but I don't really need it right now. -- Daryl Stultz _____________________________________ 6 Degrees Software and Consulting, Inc. http://www.6degrees.com mailto:[email protected]
