[Hibernate-JIRA] Créée: (HHH-2060) To be able to use <generator> with <composite-id>
by Xavier Brénuchon (JIRA)
To be able to use <generator> with <composite-id>
-------------------------------------------------
Key: HHH-2060
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2060
Project: Hibernate3
Type: Improvement
Versions: 3.2.0.cr4
Environment: Hibernate 3.x
Reporter: Xavier Brénuchon
Hello,
This is the continuation of HB-389
We develop an application which has very strong need for performance with several tens of million recordings. Partitioning is a need.
So for that, I use <composite-id>. But my primary key is not a natural key, but a real technical key :
- column of partitioning for optimization of the data base
- column of technical id
So I need to have a generator, for exemple :
<composite-id name="id" class="IdPartition">
<key-property name="org" type="string" column="ORG"/>
<key-property name="id" type="long" column="ID"/>
<generator class="fr.test.xavier.IdPartitionGenerator">
<param name="table">TAB_SEQ</param>
<param name="column">LAST</param>
</generator>
</composite-id>
The good news is that Hibernate can use that (HB-389).
In fact, it is enough to modify the DTD to authorize <generator> in <composite-id> and it is all. The current code of Hibernate manages it very well.
Is it possible that Hibernate is enriched by this functionality?
--
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
15 years, 9 months
[Hibernate-JIRA] Created: (HBX-757) Add output file name, delimiter, halt on error, and format options to SchemaUpdate/<hbm2ddl>
by Dan Ports (JIRA)
Add output file name, delimiter, halt on error, and format options to SchemaUpdate/<hbm2ddl>
--------------------------------------------------------------------------------------------
Key: HBX-757
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-757
Project: Hibernate Tools
Type: Improvement
Components: ant
Versions: 3.2beta7
Reporter: Dan Ports
Priority: Minor
The file name, delimiter, halt on error, and format options are provided by SchemaExport/<hbm2ddl> already, so it makes sense to add their functionality to SchemaUpdate as well. I'll submit a patch shortly. (Is this the right place to post this, since SchemaUpdate is in the Hibernate core SVN?)
--
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
15 years, 10 months
[Hibernate-JIRA] Created: (HHH-2310) LazyInitializationException: Initializing many-to-one and one-to-one associations to a maximum of max-fetch-depth fails when using a SQLProjection on a Criteria generated Query
by Nico De Groote (JIRA)
LazyInitializationException: Initializing many-to-one and one-to-one associations to a maximum of max-fetch-depth fails when using a SQLProjection on a Criteria generated Query
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: HHH-2310
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2310
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.0.5
Reporter: Nico De Groote
Priority: Critical
Initializing many-to-one and one-to-one associations to a maximum of max-fetch-depth fails when using a SQLProjection on a Criteria generated Query
Following scenario occurs.
I have a max-fetch-depth = default value.
I have a the following businessobject having the following associations.
BO -> BO2 (One to one)
BO -> list of BO3 (one to many)
I want to query for BO objects with the where clause containing a condition on one of the properties of the BO3 objects.
When I now generate my query via the Criteria API and having the following projection set to retrieve only my BO objects (and none of the outer joinables)
Projection projection = Projections.sqlProjection(
"{alias}." + primaryKeyColumn + " theObj__", new String[]{"theObj__"},
new Type[]{Hibernate.entity(BO.getClass())});
I get my BO objects but the BO2 object is not initialized, as it should ne because of the max-fetch-depth.
When not using the Projection I do get the one-to-one relation (BO2 object) as the max-fetch-depth is default value, but the query takes too much time because of the non required properties for the outerjoinable associations in the select clause.
It seams that the fetching of the many-to-one and the one-to-one associations for the max-fetch-depth is disabled when using projections.
Or am I missing the point here?
--
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
15 years, 10 months
[Hibernate-JIRA] Created: (HHH-2354) Schema validation too rigid for MySql enums
by Zeljko Trogrlic (JIRA)
Schema validation too rigid for MySql enums
-------------------------------------------
Key: HHH-2354
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2354
Project: Hibernate3
Type: Bug
Components: metamodel
Environment: jboss-seam-1.1.0.GA, MySQL 5
Reporter: Zeljko Trogrlic
Enum column type in MySQL is handled as CHAR in their JDBC driver and should be mapped to String Java type.
However, Hibernate expects varchar(n) and fails to do the validation.
This is how DatabaseMetaData.getColumns describes it:
DATA_TYPE=1
TYPE_NAME=enum
Note that although TYPE_NAME is enum, DATA_TYPE represents CHAR.
Hibernate reports following exception:
13:49:31,397 INFO [TableMetadata] table found: configuration.userdb_domain_acl
13:49:31,397 INFO [TableMetadata] columns: [id, enabled, tablename, domain]
13:49:31,397 WARN [ServiceController] Problem starting service persistence.units:ear=msmgui.ear,unitName=msmgui
javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: enabled, expected: varchar(
2)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:698)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)
at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:264)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Validation should be fixed/relaxed to avoid this problem.
--
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
15 years, 11 months
[Hibernate-JIRA] Created: (HHH-2077) Providing an escape sequence for Criteria queries
by Tobias Dietl (JIRA)
Providing an escape sequence for Criteria queries
-------------------------------------------------
Key: HHH-2077
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2077
Project: Hibernate3
Type: Improvement
Components: query-criteria
Versions: 3.1.3, 3.2.0 cr1, 3.2.0.cr2, 3.2.0.cr3, 3.2.0.cr4
Environment: Hibernate 3.1.3, MySQL, HSQLDB, Oracle
Reporter: Tobias Dietl
Up to now, there is no way of setting the escape sequence to use for string comparisions with like for Criteria queries.
This is necessary as MySQL on the one hand and HSQLDB / Oracle on the other behave differently...
If you want to search for '_abc' in MySQL, you have to use:
value like '\\_abc'
In Oracle or HsqlDB, you have to use:
value like '\_abc'
If you want to switch to another escape sequence like '|' , you can set it in HQL with value like '|_abc' escape '|'. Unfortunately, there is no way of setting it for Criteria queries, which would force me to rewrite all my Criteria queries in HQL. It would really be nice if the feature/improvement would be added...
--
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
15 years, 12 months