Hi Offray,
There isn’t currently a formal way to do the automatic transformation you
describe (it would be a nice enhancement though). What I have done in similar
situations is to carry out the transformation in inst var accessors, e.g.
userPictureURL
^userPictureURL ifNotNil: [ZnUrl f
Hi John,
Thanks. With the improved error message I was able to pin the cause of
error better.
The issue was that I was declaring the user picture URL as a ZnURL
instead of as a string in the reStoreDefinition, but I was not telling
ReStore how to store ZnUrl objects. So I made the returning
Hi Offray - could you try modifying SSWReStore>>createProxyForNewObject: as
follows:
...
table := self tableForClass: anObject class.
"Add this ->” table isNil ifTrue: [ self error: 'cannot find table for ',
anObject class name ].
id := table idDataField ifNotNil: [ :idDataFi
Hi John,
Effectively ReStore didn't was storing the table object for the Nitter
class. But after following your advice, i'm now able to debug both the
TwitterUser and the NitterUser and obtain the same result (which makes
sense as the later is inherited from the former). I think that my error
Hi Offray,
Regarding the error, I’m guessing that ReStore doesn’t have a table object for
your NitterUser class for some reason. Could you try:
myReStore tableForClass: NitterUser
…and check if this is returning nil? If so there’s an issue with creating the
table for the class; you could tr
Thanks Jhon, it definitively helps.
What I did was to extract some important metadata as slots of the Tweet
object and made explicit the authorId, which allows me to trace tweets
authorship:
===
Tweet>>class #reStoreDefinition
^ super reStoreDefinition
defineAsID: #id;
define: #text a
Hi Offray,
You’re correct that ReStore can’t store that kind of mixed dictionary directly.
You could store the entire STON text as one string and reify it on read, though
that would mean you can’t easily query on the metadata.
A compromise solution would be to define objects and slots for the