[Hibernate-JIRA] Commented: (HHH-1483) MySQL5: No Dialect mapping for JDBC type: -1
by Gail Badner (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1483?page=c... ]
Gail Badner commented on HHH-1483:
----------------------------------
This should be fixed by HHH-3892. The fix is already checked into trunk and will be ported to the other branches shortly.
Could someone please try checking out trunk (http://anonsvn.jboss.org/repos/hibernate/core/trunk/) and let me know if it solves this problem?
Please note that, due to HHH-2669, the Hibernate type,"text", will be mapped to the MySQL column type, "longtext".
Thanks,
Gail
> MySQL5: No Dialect mapping for JDBC type: -1
> --------------------------------------------
>
> Key: HHH-1483
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1483
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.1.2
> Environment: MySQL 5.0.18-nt
> Reporter: Sergey Vladimirov
> Priority: Minor
> Attachments: hhh-1483-patch.txt
>
>
> MySQL5: No Dialect mapping for JDBC type: -1
> SELECT answpos,answer FROM votes_answers WHERE question=? ORDER BY answpos
> mysql> describe votes_answers;
> +----------+---------+------+-----+---------+-------+
> | Field | Type | Null | Key | Default | Extra |
> +----------+---------+------+-----+---------+-------+
> | question | int(11) | NO | MUL | | |
> | answpos | int(11) | NO | | | |
> | answer | text | YES | | NULL | |
> +----------+---------+------+-----+---------+-------+
> mysql> describe temp;
> +---------+---------+------+-----+---------+-------+
> | Field | Type | Null | Key | Default | Extra |
> +---------+---------+------+-----+---------+-------+
> | answpos | int(11) | NO | | 0 | |
> | answer | text | YES | | NULL | |
> +---------+---------+------+-----+---------+-------+
> Please, let me know what to add to MySQL5Dialect :)
> Will it be ok to add? :
> registerColumnType( Types.LONGVARCHAR, "text" );
--
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, 7 months
[Hibernate-JIRA] Commented: (HHH-1483) MySQL5: No Dialect mapping for JDBC type: -1
by Sergey Vladimirov (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1483?page=c... ]
Sergey Vladimirov commented on HHH-1483:
----------------------------------------
still have this problem with MySQL InnoDB Dialect and 3.3.1 GA
> MySQL5: No Dialect mapping for JDBC type: -1
> --------------------------------------------
>
> Key: HHH-1483
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1483
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.1.2
> Environment: MySQL 5.0.18-nt
> Reporter: Sergey Vladimirov
> Priority: Minor
> Attachments: hhh-1483-patch.txt
>
>
> MySQL5: No Dialect mapping for JDBC type: -1
> SELECT answpos,answer FROM votes_answers WHERE question=? ORDER BY answpos
> mysql> describe votes_answers;
> +----------+---------+------+-----+---------+-------+
> | Field | Type | Null | Key | Default | Extra |
> +----------+---------+------+-----+---------+-------+
> | question | int(11) | NO | MUL | | |
> | answpos | int(11) | NO | | | |
> | answer | text | YES | | NULL | |
> +----------+---------+------+-----+---------+-------+
> mysql> describe temp;
> +---------+---------+------+-----+---------+-------+
> | Field | Type | Null | Key | Default | Extra |
> +---------+---------+------+-----+---------+-------+
> | answpos | int(11) | NO | | 0 | |
> | answer | text | YES | | NULL | |
> +---------+---------+------+-----+---------+-------+
> Please, let me know what to add to MySQL5Dialect :)
> Will it be ok to add? :
> registerColumnType( Types.LONGVARCHAR, "text" );
--
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, 7 months
[Hibernate-JIRA] Created: (HHH-3889) Foreign key constraint should not be generated when <any> is used as element in a collection
by Rice Yeh (JIRA)
Foreign key constraint should not be generated when <any> is used as element in a collection
--------------------------------------------------------------------------------------------
Key: HHH-3889
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3889
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.0.SP1
Environment: hibernate verson = 3.3.0.sp1, db=h2
Reporter: Rice Yeh
Let P0, P1 and C are 3 classes. Both P0 and P1 have a set of C.
This is like parent-child relationship. In C, there is a field p
with type I, which is a interface shared by P0 and P1. These 3 classes are like below:
class P0 implements I {
Long oid;
Set<C> cs;
...
}
class P1 implements I {
Long oid;
Set<C> cs;
...
}
class C {
I p;
..
}
Their hbm mappings are like the following:
<class name="P0">
<id name="oid" type="java.lang.Long">
<generator class="native"/>
</id>
<set name="cs" cascade="all,delete-orphan" inverse="true">
<key column="P_OID" not-null="true"/>
<one-to-many class="C"/>
</set>
</class>
<class name="P1">
<id name="oid" type="java.lang.Long">
<generator class="native"/>
</id>
<set name="cs" cascade="all,delete-orphan" inverse="true">
<key column="P_OID" not-null="true"/>
<one-to-many class="C"/>
</set>
</class>
<class name="C">
<id name="oid" type="java.lang.Long">
<generator class="native"/>
</id>
<any name="p" meta-type="string" id-type="long">
<column name="P_CLASS"/>
<column name="P_OID"/>
</any>
</class>
Then 2 foreign key constraints F0 and F1 for P_OID in C to P0 and P1
are created when generated DDL respectively. This is not right
because persisting a object p0 in P0 will violate the constraint F1
and persisting a object p1 in P1 will violate the constraint F0.
--
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, 7 months
[Hibernate-JIRA] Created: (HHH-3907) HQL produces bad SQL - unable to query on parent fields on class using joined-subclass
by Elaine (JIRA)
HQL produces bad SQL - unable to query on parent fields on class using joined-subclass
--------------------------------------------------------------------------------------
Key: HHH-3907
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3907
Project: Hibernate Core
Issue Type: Bug
Components: query-hql
Affects Versions: 3.2.6
Environment: Windows XP
Reporter: Elaine
Priority: Blocker
Hibernate: select specificemplo0_.person_ds_id as DATA1_395_, specificemplo0_2_.PERSON_ID as PERSON2_395_, specificemplo0_2_.NAME as NAME395_, specificemplo0_2_.FIRST_NAME as FIRST4_395_, specificemplo0_2_.MIDDLE_NAME as MIDDLE5_395_, specificemplo0_2_.LAST_NAME as LAST6_395_, specificemplo0_2_.DATE_OF_BIRTH as DATE7_395_, specificemplo0_2_.PHONE_NUMBER as PHONE8_395_, specificemplo0_2_.FAX_NUMBER as FAX9_395_, specificemplo0_2_.E_MAIL as E10_395_, specificemplo0_2_.ADDRESS_ID as ADDRESS11_395_, specificemplo0_2_.STREET_LINE1 as STREET12_395_, specificemplo0_2_.STREET_LINE2 as STREET13_395_, specificemplo0_2_.CITY as CITY395_, specificemplo0_2_.COUNTRY as COUNTRY395_, specificemplo0_2_.COUNTY as COUNTY395_, specificemplo0_2_.STATE as STATE395_, specificemplo0_2_.ZIP_CODE as ZIP18_395_, specificemplo0_1_.employee_id as employee2_396_, specificemplo0_1_.COMPANY_ID as COMPANY3_396_, specificemplo0_1_.JOB_TITLE_DS_ID as JOB5_396_, specificemplo0_1_.POSITION_DESC as POSITION8_396_, specificemplo0_1_.EMERGENCY_CONTACT_DS_ID as EMERGENCY9_396_, specificemplo0_1_.SHIFT_DS_ID as SHIFT10_396_, specificemplo0_1_.SUPERVISOR_DS_ID as SUPERVISOR11_396_, specificemplo0_.EMPLOYEE_STATUS as EMPLOYEE7_399_, from JL_EMPLOYEE_VIEW specificemplo0_ inner join CLA_EMPLOYEE specificemplo0_1_ on specificemplo0_.person_ds_id=specificemplo0_1_.person_ds_id inner join CLA_PERSON specificemplo0_2_ on specificemplo0_.person_ds_id=specificemplo0_2_.DATA_SOURCE_ID, IFSAPP.CLA_COMPANY company1_ where specificemplo0_1_.COMPANY_ID=company1_.COMPANY_ID and company1_.COMPANY_ID='MOD' and specificemplo0_.employee_id='P101'
ERROR [main] org.hibernate.util.JDBCExceptionReporter (JDBCExceptionReporter.java:78) - ORA-00904: "SPECIFICEMPLO0_"."EMPLOYEE_ID": invalid identifier
Mapping file:
has 2 joined-subclasses
this is the gist of th mappnig file...
<class Person table="cla_person" polymorphism="implicit">
<id = data_source_id/>
<joined-subclass Employee extends person table="cla_employee">
<key = pesron_ds_id/>
<porperty name ="employeeId "......coulmn="EMPLOYEE_ID">
<porperty name ="company"......>
<joined-subclass SpecificEmployee extends Employee table=jl_employee_view>
<key = person_ds_id/>
</joined-subclass>
</joined-subclass>
</class>
HQL : from SpecificEmployee where company.companyId='MOD' and employeeId = 'P101'
--
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, 7 months
[Hibernate-JIRA] Created: (HHH-3904) Veto by Pre-Event Listeners does not work properly.
by Rupesh Kumar (JIRA)
Veto by Pre-Event Listeners does not work properly.
---------------------------------------------------
Key: HHH-3904
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3904
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.1
Environment: Hibernate 3.3.1
Any DB
Reporter: Rupesh Kumar
As per the API of PreInsert/Update/DeleteEventListeners, if it returns "true", the operation should be aborted. However, the behavior I see is and I can confirm from the hibernate source as well is - the operation does get aborted but then it proceeds to call the post events and then it tries to proceed further resulting in some assertion error. So there are two issues here
- Post Events get called even though the operation does not happen.
- If the pre* callbacks return true, it leads to some exception. Here is the stacktrace for Insert
org.hibernate.AssertionFailure: null identifier
at org.hibernate.engine.EntityKey.<init>(EntityKey.java:61)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:325)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:130)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:117)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:534)
In the hibernate source 3.3.1 -> take a look at org.hibernate.action.EntityIdentityInsertAction.execute():65
It gets the veto result back and inserts only if veto was false. however it then calls postInsert() irrespective of veto value.
Since this was triggered by ActionQueue.execute(), the veto information could not be propagated back and hence AbstractSaveEventListener tries to proceed ahead and finally throws up error.
--
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, 7 months