rko281 / ReStoreForPharo

Relational database persistence for Pharo objects
MIT License
32 stars 7 forks source link

using Dictionary with String as key and value, produces wrong table #5

Closed datensenke closed 4 years ago

datensenke commented 4 years ago
Great work! I like it! But, there is at least one problem. If I define a class with: reStoreDefinition ^ super reStoreDefinition define: #name as: (String maxSize: 4096); define: #dir as: (Dictionary of: (String maxSize: 50) -> (String maxSize: 50)) and I have a Dictionary: dict:=Dictionary new. dict at: 'key1' put: 'value1'. dict at: 'key2' put: 'value2'. and put it into the object: data dict: dict. and store it: data storeIn: someRestoreObject I'll end up with a table: ` id source_id target_id index_
1 1 v key1
2 1 a key1
3 1 l key1
4 1 u key1
5 1 e key1
6 1 1 key1
7 1 v key2
8 1 a key2
9 1 l key2
10 1 u key2
11 1 e key2
12 1 2 key2

` Is this a bug or am I doing something wrong?

regards

rko281 commented 4 years ago

No, that's definitely a bug and I can see what's causing it.

I'll push a fix through shortly.