[Hibernate-JIRA] Created: (HHH-5393) @MapKey with embeddable value
by Harald Wellmann (JIRA)
@MapKey with embeddable value
-----------------------------
Key: HHH-5393
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5393
Project: Hibernate Core
Issue Type: Bug
Components: annotations
Affects Versions: 3.5.3
Environment: Hibernate 3.5.3, PostgreSQL 8.4.3
Reporter: Harald Wellmann
Map<Basic, Embeddable> does not work, when the map key is a persistent field of the value. The map key shall not be represented as a separate table column, this is why the example uses @MapKey and not @MapKeyColumn.
Example:
{code:java}
@Embeddable
public class LocalizedString {
private String language;
private String text;
}
@Entity
public class MultilingualString {
@Id
private long id;
@ElementCollection(fetch=FetchType.EAGER)
@MapKey(name = "language")
@CollectionTable(schema = "jpa", name = "multilingual_string_map",
joinColumns = @JoinColumn(name = "string_id"))
private Map<String, LocalizedString> map = new HashMap<String, LocalizedString>();
}
{code}
Hibernate appears to expect an Entity as map value:
org.hibernate.AnnotationException: Associated class not found: LocalizedString
Detailed discussion of this use case:
http://hwellmann.blogspot.com/2010/07/jpa-20-mapping-map.html
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 4 months
[Hibernate-JIRA] Created: (HHH-3191) QueryPlanCache cache size
by Julien Kirch (JIRA)
QueryPlanCache cache size
-------------------------
Key: HHH-3191
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3191
Project: Hibernate3
Issue Type: Improvement
Components: query-hql
Affects Versions: 3.2.6
Environment: Hibernate 3.2.6, all platform
Reporter: Julien Kirch
On a large application with many (currently 696) named queries in hbm files we have a performance issue with the QueryPlanCache cache size:
The SoftLimitMRUCache used in the QueryPlanCache use 128 hard references, the other being soft references, and this number is hardcoded.
As we have much more querries in the application, we spend much time in recompiling the same queries when they are evicted from the cache.
As the QueryPlanCache has a SessionFactoryImplementor as parameter, adding a new parameter to define the query cache plan size would be trivial; what's your opinion about this ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months
[Hibernate-JIRA] Created: (HHH-4627) Configurable Query Plan Cache
by Frank Daspro (JIRA)
Configurable Query Plan Cache
-----------------------------
Key: HHH-4627
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4627
Project: Hibernate Core
Issue Type: New Feature
Components: query-hql
Affects Versions: 3.2.2
Environment: Hibernate 3.22 GA, Oracle 10G database
Reporter: Frank Daspro
Our application heavily uses dynamic sql some of which are highly parameterised and with many permutations. Out of neccessity we also have a very large JVM heap space (12GB). As a result we end up with a very large memory utilisation for the Query Plan cache. From a recent memory dump it was noted the QueryPlanCache had 25000 entries and consuming 2.5GB of heap space. Our full Garbage collections end up taking longer than it would normally take with a smaller QueryPlanCache.
I understand via a related issue (http://opensource.atlassian.com/projects/hibernate/browse/HHH-3191) there is a hard limit of 128 entries, and an endless soft limit which is only garbage collected during a full garbage collection. It would be nice if the following features could be added:
1) Configuration options to specify the hard and soft limits (with a 0 to disable or similar).
2) Configurable at the query level such that specific queries can be excluded from the the QueryPlanCache. eg. something like hibernateQuery.setParsedHQLCacheable(false).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months