Hi there,

quite unrelated to the other things, I would need to exploit the 
ValueFactory/ValueConversion support of EOF to store my own complex values in 
BLOBs.

There's a catch though: for a ValueFactory-generated object, I would need to 
know which EO it belongs to (so that, iff the object's own internal state 
changes, it can change the EO contents appropriately).

Is there any way to do that?

If important, here's the rationale: so far, I have used two distinct 
attributes, conceptually like this:

===
class DBSomething extends ERXCustomObject {
  NSData attributeBlob() { storedValueForKey("attributeBlob") } // modelled. 
Never used directly, but for the cases below
  MyCustomObject attribute() { new 
MyCustomObject(attributeBlob,this,"attributeBlob") }
}
class MyCustomObject {
  MyCustomObject(NSData contents, ERXEnterpriseObject owner, String key) {
    ... ...
    NSData blobRepresentation() { ... ... }
    void didChange() { owner.takeStoredValueForKey(blobRepresentation(), key) }
}
===

but it seems to me it would be cleaner if I could defer creation of 
MyCustomObject to the ValueFactory, storing the changes to the ValueConversion, 
and get rid of the ugly dichotomy of foo and fooBlob, removing fooBlob 
completely and seeing only foo (of type MyCustomObject) at the code level.

Thanks and all the best,
OC

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to