Ok, the problem seems to be coming from :
org.qi4j.spi.value.SerializableType.toJSON( Object value, JSONWriter
json )
else if( value instanceof ValueComposite )
{
value = ( (ValueComposite) value ).toJSON();
}
// Serialize value
try
{
...
Any idea why we serialize the JSonized value ? (And the entity
reference BTW !) What about calling json.value(value); directly ?
cheers,
Phil
Le 25 août 2009 à 12:19, Niclas Hedhman a écrit :
On Tue, Aug 25, 2009 at 5:35 PM, philippe van dyck<[email protected]>
wrote:
Actually, I looks like that :
public interface MacAddress {
interface Factory {
MacAddress create(BigInteger macNumber);
MacAddress create(String macString) throws MacAddressFormatException;
}
Property<BigInteger> mac();
}
And :
@Mixins(MacAddressValue.MacAddressImpl.class)
public interface MacAddressValue extends ValueComposite, MacAddress
{ }
I got an error from the JSon serialization when I tried to store an
entity
using this value, so I modified the JSon-inazation the same way I
did for
BigDecimal (converting to string).
It is now working fine but the JSon content of my entity is :
{"identity
":"mac.V
","type
":"com.netzep.chilliz.domain.model.assembly.voucher.VoucherEntity
","version":"7b1c6969-37ec-41dc-9a09-3244fb04d9c5-3","modified":
1251192705261,"properties":
{"macAddress
":"rO0ABXQAF3sibWFjIjoiMTEwMzgyMzQzODA4MSJ9
","used":false,"identity":"mac.V"},"associations":
{"lot":"7461ce863.L"},"manyassociations":{}}
So it was converted in JSon format and then it was serialized...
Am I missing something ?
Latest version??
Go to org.qi4j.spi.value.NumberType and see if you have BigDecimal and
BigInteger in the list of if statements... If you do, can you debug
yourself through there?
Cheers
--
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java
I live here; http://tinyurl.com/2qq9er
I work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev