Closed GoogleCodeExporter closed 8 years ago
The 'count' field in the stacktrace is one of the internal String object's
fields. I'm just guessing that something needs to be done to only store the
string-text itself, instead of using reflection to persist all the internal
fields of String.
Original comment by haag...@comcast.net
on 7 Sep 2010 at 3:38
Because String is a "native" type you do not need to declare the Map @Embedded.
The MapTranslator is a part of the standard translators in v2.0 and does not
need any extra configuration to work.
Twig is trying to embed the String objects which means analysing its fields to
store as properties.
Original comment by jdpatterson
on 7 Sep 2010 at 9:03
That's ok, thanks for the explanation. Would it make sense to detect this kind
of misconfiguration and notify the developer of the problem?
Original comment by haag...@comcast.net
on 7 Sep 2010 at 3:00
Good point. I've added some extra context to the exception:
if (DataTypeUtils.isSupportedType(object.getClass()))
{
throw new IllegalStateException("Native data type " + object.getClass() + " should not be configured as embedded");
}
Original comment by jdpatterson
on 7 Sep 2010 at 3:19
Original issue reported on code.google.com by
haag...@comcast.net
on 7 Sep 2010 at 3:35