|
When using Annotation @Fetch(FetchMode.SUBSELECT) on a OneToMany or ManyToMany relation, the memory gets polluted with lots of char[] Instances. The BatchFetchQueue holds one instance of type SubselectFetch per key and each of it holds a substring of the filteredSQL. Since jdk7 the constructor with value, offset and count has changed. The value is now copied into a new char[]. If many keys are returned and the statement is a bit complex (e.g. lots of joins), this will leads to an OutOfMemoryException.
|