[ 
https://issues.apache.org/jira/browse/CAY-2641?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Ray Gentry updated CAY-2641:
------------------------------------
    Description: 
Add the ability to mark an attribute as lazy.  Such attributes will be excluded 
from the original SELECT query and subsequently calling the lazy attribute's 
getter (and perhaps the setter?) will trigger a fault to the DB to retrieve the 
actually contents.  This will be useful for BLOB type data that you might want 
to exclude during a normal fetch of metadata (file name, size, etc) in tables 
where which include both.

Initial thoughts:
 * Update Cayenne Modeler to have a "Lazy" column in the Object Attribute 
editor which is a checkbox (like the Optimistic Locking toggle).
 * Update the XML format to support a lazy="true" or lazy="false" (the default) 
attribute to the obj-attribute tag.
 * Update CayenneDataObject to handle lazy attribute faults.  Will likely need 
some new support classes.
 * Update Velocity templates to generate correct code for lazy attributes.
 * Update query code to omit lazy attributes from SELECTs and create fault 
objects for them.
 * Update commit code to omit lazy attributes from UPDATEs (ones that haven't 
been faulted in yet, even if used for Optimistic Locking).

I'm sure there are other things I'm missing, plus need to handle ROP, which I'm 
not familiar with using.

 

  was:
Add the ability to mark an attribute as lazy.  Such attributes will be excluded 
from the original SELECT query and subsequently calling the lazy attribute's 
getter (and perhaps the setter?) will trigger a fault to the DB to retrieve the 
actually contents.  This will be useful for BLOB type data that you might want 
to exclude during a normal fetch of metadata (file name, size, etc) in tables 
where which include both.

Initial thoughts:
 * Update Cayenne Modeler to have a "Lazy" column in the Object Attribute 
editor which is a checkbox (like the Optimistic Locking toggle).
 * Update the XML format to support a lazy="true" or lazy="false" (the default) 
attribute to the obj-attribute tag.
 * Update CayenneDataObject to handle lazy attribute faults.  Will likely need 
some new support classes.
 * Update Velocity templates to generate correct code for lazy attributes.
 * Update query code to omit lazy attributes from SELECTs.
 * Update commit code to omit lazy attributes from UPDATEs.

I'm sure there are other things I'm missing, plus need to handle ROP, which I'm 
not familiar with using.

 


> Add Lazy Attributes
> -------------------
>
>                 Key: CAY-2641
>                 URL: https://issues.apache.org/jira/browse/CAY-2641
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Core Library, Documentation, Modeler, ROP, Website
>    Affects Versions: Undefined future
>            Reporter: Michael Ray Gentry
>            Priority: Minor
>             Fix For: Undefined future
>
>
> Add the ability to mark an attribute as lazy.  Such attributes will be 
> excluded from the original SELECT query and subsequently calling the lazy 
> attribute's getter (and perhaps the setter?) will trigger a fault to the DB 
> to retrieve the actually contents.  This will be useful for BLOB type data 
> that you might want to exclude during a normal fetch of metadata (file name, 
> size, etc) in tables where which include both.
> Initial thoughts:
>  * Update Cayenne Modeler to have a "Lazy" column in the Object Attribute 
> editor which is a checkbox (like the Optimistic Locking toggle).
>  * Update the XML format to support a lazy="true" or lazy="false" (the 
> default) attribute to the obj-attribute tag.
>  * Update CayenneDataObject to handle lazy attribute faults.  Will likely 
> need some new support classes.
>  * Update Velocity templates to generate correct code for lazy attributes.
>  * Update query code to omit lazy attributes from SELECTs and create fault 
> objects for them.
>  * Update commit code to omit lazy attributes from UPDATEs (ones that haven't 
> been faulted in yet, even if used for Optimistic Locking).
> I'm sure there are other things I'm missing, plus need to handle ROP, which 
> I'm not familiar with using.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to