Re recent changes on Freetalk involving storing enum's:
Db4o has some problems with enum's. I believe it sees the static values of the 
enum on each startup as distinct from the values from previous startups which 
were stored in the database. Hence in Compressor we have a method called 
getOfficial(), which checks the name and returns the correct static enum value.

There is a config option to store the static values of enum's for db4o 
somewhere. It might be worth trying that.

The likely impact of this behaviour is that == doesn't work.

This is all vaguely from memory; we really need a unit test for it.

[18:31:45] <toad_> p0s: also, enum's are a bit of a pain in db4o
[18:31:48] <toad_> p0s: i believe they get copied
[18:31:57] <toad_> so == doesn't work any more ???
[18:32:02] <toad_> i'm not sure
[18:32:17] <toad_> certainly they don't persist automatically unless you set a 
config option for them to do so
- we had some trouble with this with Compressor's iirc?

What exactly was the problem with db4o and enum's?
I think we were creating a new copy of the enum every time we stored it?
Does configuring db4o to store enums' values fix this?
See Compressor.getOfficial()!
Need to write a test for this. And see whether the store-enums option helps. 
And if it does whether we can use that in fred.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20100421/734171ab/attachment.pgp>

Reply via email to