More as an implementation trial (I wanted to see how to do it) I implemented the Isis applib "Image" class as a stored / retrieved value type in the SQL -OS using BLOBs.. it was just a case of implementing the appropriate valuemapper (which converts the Image into/out of Input-/OutputStreams) and making the "select" and "update" methods aware of InputStream as a prepared value type..
I have not committed the code as I am getting a weird situation: the full test suite passes in JUnit (in Eclipse) but fails (on Image.getWidth()!!) when I run "mvn test"... Anyway, to my question: What is the most appropriate method of telling the SQL-OS to not automatically load these values? This is linked to Giedrius's question which Dan provides some hints to, below. Dan, any specific hints as to what's required? I guess some kind of domain marker (e.g. an annotation would probably be easiest, my preferences notwithstanding) which is picked up by either the (Abstract)AutoMapper or the FieldMapping implementation.. but the viewers would still need a way to actually force the value to be loaded when it is ultimately required, e.g. to upload the document / image to the user.. I am not seeing how individual domain/entity properties can indicate their "loaded" state. At present the SQL-OS treats the entire entity as loaded or not loaded. (This is also linked to a possible extension to the SQL-OS: if the "dirty" state of individual properties is known/used, then only those properties that have changed could be updated... my real challenge would be to detect adding/removing items from collections, and adding/removing them individually from the SQL-OS tables, but I digress... ) On 17 Sep 2012 at 11:30, Giedrius Grazevicius wrote: > Hi all, > > > The object factory was designed to take care of lazy-loading of references, > > but actually it would also work, I think, for values. So from the > > viewer-side of the AdapterManager, I believe we have things covered. > > Thanks, Dan, I will look into this. > > > I have some time right now to look into file support for the SQL-OS > > and the htmlviewer, if you want any help. > > Sure. I'll reach out to you later this week. > > > I don't know if you read my previous thread on this topic[1]. > > I haven't, thank you. It's good to know, that this was already discussed > before. > > > Giedrius.
