[Hibernate-JIRA] Created: (HHH-3161) No Dialect mapping for JDBC type: -4
by cyrus (JIRA)
No Dialect mapping for JDBC type: -4
------------------------------------
Key: HHH-3161
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3161
Project: Hibernate3
Issue Type: Bug
Components: core, query-hql, query-sql
Affects Versions: 3.2.1
Environment: hibernate 3.2.1 + mysql
Reporter: cyrus
Priority: Critical
When I execute the statement below:
SELECT concat(case ip_protocol when 6 then 'TCP' when 17 then 'UDP' else 'OTHER' end, ', PORT ', repeat(' ', 5 - length(if(port is NULL, 0, port))), if(port is NULL, 0, port)) as protocol, concat(case ip_protocol when 6 then 'TCP' when 17 then 'UDP' else 'OTHER' end, if(port is NULL, 0, port)) as id, sum(byte_subtotal) as total FROM usage_sum_minute WHERE from_unixtime(time_min * 60) between '2008-02-03 14:00:00' and '2008-03-05 13:59:00' GROUP BY protocol ORDER BY total DESC LIMIT 0, 20
DB schema:
CREATE TABLE `ascot`.`usage_sum_minute` (
`id` int(11) NOT NULL auto_increment,
`igateway_id` smallint(5) NOT NULL,
`time_min` int(11) NOT NULL,
`user_name` varchar(255) default NULL,
`mac_local` varchar(80) NOT NULL,
`ip_local` bigint(20) NOT NULL,
`ip_remote` bigint(20) NOT NULL,
`ip_protocol` smallint(5) NOT NULL,
`port` smallint(6) default NULL,
`domain_name` char(80) default NULL,
`url` varchar(1024) default NULL,
`byte_subtotal` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
KEY `index_igateway` (`igateway_id`),
KEY `index_protocol` (`ip_protocol`),
KEY `index_minute` (`time_min`),
KEY `index_user` (`user_name`),
KEY `index_port` (`port`),
KEY `index_ip` (`ip_remote`)
) ENGINE=InnoDB AUTO_INCREMENT=505699 DEFAULT CHARSET=latin1
It give an exception "No Dialect mapping for JDBC type: -4"
--
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, 4 months
[Hibernate-JIRA] Created: (ANN-751) Hibernate reports erroneous "possible typo error" for properties with protected accessor methods
by Stephen R. Saucier (JIRA)
Hibernate reports erroneous "possible typo error" for properties with protected accessor methods
------------------------------------------------------------------------------------------------
Key: ANN-751
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-751
Project: Hibernate Annotations
Issue Type: Improvement
Affects Versions: 3.3.0.ga
Reporter: Stephen R. Saucier
Priority: Minor
Attachments: checkForOrphanProperties.patch
According to the EJB3 spec, section 2.1.1 (Persistent Fields and Properties), "property accessor methods must be public or protected." However, the checkForOrphanProperties method of org.hibernate.cfg.annotations.reflection.EJB3OverridenAnnotationReader only looks for public methods (by virtue of the fact that it is using the getMethods method of Class. I believe that the checkForOrphanProperties method ought to look at the protected methods implemented in the entity class as well in order to eliminate the erroneous warning messages that are reported when using hibernate with protected property accessor methods.
I've attached a patch which implements this additional behavior.
--
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, 4 months
[Hibernate-JIRA] Created: (HBX-1093) Missing inverseJoinColumn at ManyToMany relations with composite keys
by Nils Kelleter (JIRA)
Missing inverseJoinColumn at ManyToMany relations with composite keys
---------------------------------------------------------------------
Key: HBX-1093
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1093
Project: Hibernate Tools
Issue Type: Bug
Components: hbm2java
Affects Versions: 3.2.2, 3.2LATER
Environment: Hibernate Tools version 3.2.2.Beta1 and 3.2.4.CR1-N200810300202, Oracle Database
Reporter: Nils Kelleter
Using the hbm2java tool for reverse engineering of database tables, the following problem exists:
At ManyToMany relations with composite keys an inverseJoinColumn is missing.
Wrong code:
@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinTable(name = "ET_MANY_TO_MANY_COMP_MAPPING",
joinColumns = {
@JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP1_ID", nullable = false, updatable = false),
@JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP11_ID", nullable = false, updatable = false) },
inverseJoinColumns = {
@JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP2_ID", nullable = false, updatable = false) })
public Set<EtManyToManyComp2> getEtManyToManyComp2s() {
return this.etManyToManyComp2s;
}
@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinTable(name = "ET_MANY_TO_MANY_COMP_MAPPING",
joinColumns = {
@JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP2_ID", nullable = false, updatable = false),
@JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP22_ID", nullable = false, updatable = false) },
inverseJoinColumns = {
@JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP1_ID", nullable = false, updatable = false) })
public Set<EtManyToManyComp1> getEtManyToManyComp1s() {
return this.etManyToManyComp1s;
}
Correct code:
@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinTable(name = "ET_MANY_TO_MANY_COMP_MAPPING",
joinColumns = {
@JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP1_ID", nullable = false, updatable = false),
@JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP11_ID", nullable = false, updatable = false) },
inverseJoinColumns = {
@JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP2_ID", nullable = false, updatable = false),
@JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP22_ID", nullable = false, updatable = false) })
public Set<EtManyToManyComp2> getEtManyToManyComp2s() {
return this.etManyToManyComp2s;
}
@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinTable(name = "ET_MANY_TO_MANY_COMP_MAPPING",
joinColumns = {
@JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP2_ID", nullable = false, updatable = false),
@JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP22_ID", nullable = false, updatable = false) },
inverseJoinColumns = {
@JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP1_ID", nullable = false, updatable = false),
@JoinColumn(name = "FK_ET_MANY_TO_MANY_COMP11_ID", nullable = false, updatable = false) })
public Set<EtManyToManyComp1> getEtManyToManyComp1s() {
return this.etManyToManyComp1s;
}
For reproducing this, you can use the following Oracle SQL scripts:
CREATE TABLE ET_MANY_TO_MANY_COMP1 (
ET_MANY_TO_MANY_COMP1_ID NUMBER,
ET_MANY_TO_MANY_COMP11_ID NUMBER,
FIELD VARCHAR2(10),
PRIMARY KEY (ET_MANY_TO_MANY_COMP1_ID, ET_MANY_TO_MANY_COMP11_ID)
);
CREATE TABLE ET_MANY_TO_MANY_COMP2 (
ET_MANY_TO_MANY_COMP2_ID NUMBER,
ET_MANY_TO_MANY_COMP22_ID NUMBER,
FIELD VARCHAR2(10),
PRIMARY KEY (ET_MANY_TO_MANY_COMP2_ID, ET_MANY_TO_MANY_COMP22_ID)
);
CREATE TABLE ET_MANY_TO_MANY_COMP_MAPPING (
FK_ET_MANY_TO_MANY_COMP1_ID NUMBER,
FK_ET_MANY_TO_MANY_COMP11_ID NUMBER,
FK_ET_MANY_TO_MANY_COMP2_ID NUMBER,
FK_ET_MANY_TO_MANY_COMP22_ID NUMBER,
FOREIGN KEY (FK_ET_MANY_TO_MANY_COMP1_ID,FK_ET_MANY_TO_MANY_COMP11_ID)
REFERENCES ET_MANY_TO_MANY_COMP1(ET_MANY_TO_MANY_COMP1_ID,ET_MANY_TO_MANY_COMP11_ID),
FOREIGN KEY (FK_ET_MANY_TO_MANY_COMP2_ID, FK_ET_MANY_TO_MANY_COMP22_ID)
REFERENCES ET_MANY_TO_MANY_COMP2(ET_MANY_TO_MANY_COMP2_ID, ET_MANY_TO_MANY_COMP22_ID),
PRIMARY KEY (FK_ET_MANY_TO_MANY_COMP1_ID,FK_ET_MANY_TO_MANY_COMP11_ID,FK_ET_MANY_TO_MANY_COMP2_ID,FK_ET_MANY_TO_MANY_COMP22_ID)
);
--
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, 4 months
[Hibernate-JIRA] Created: (HBX-1112) Reverse engineering problem with composite primary key
by Christian Meyer (JIRA)
Reverse engineering problem with composite primary key
------------------------------------------------------
Key: HBX-1112
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1112
Project: Hibernate Tools
Issue Type: Bug
Affects Versions: 3.2.4 Beta1
Environment: configuration:
Hibernate Tools version: HibernateTools-3.2.4.CR2-R200901280154
Hibernate version: hibernate-3.2.6.ga.zip
Database: Sybase SQL Anywhere 10.0.1.3415
JDBC-Driver: jconnect 6.05
Eclipse Version: 3.4.0
Code Generation Configuration:
Use Java 5 syntax and generate EJB3 annotations switched on.
Exporters: domain code.
Reporter: Christian Meyer
Hello,
I have a problem reverse engineering domain code from a sybase anywhere 10 database.
For every table with composite primary key i get the following exception:
org.hibernate.cfg.JDBCBinderException: Duplicate names found for primarykey.
Her is one example:
create table DCALLS
(
AES timestamp default timestamp,
APPLID char(8) not null,
DIALOG integer not null,
COUNTER integer,
constraint PK_DCALLS primary key (APPLID, DIALOG)
);
For downloading developer edition of sybase anywhere version 10 follow the link: http://marketing.ianywhere.com/forms/SQLAny10DevEditionCDReigster
I used a Hibernate dialect from the sybase homepage: http://www.sybase.de/detail?id=1057826
org.hibernate.cfg.JDBCBinderException: Duplicate names found for primarykey.
Existing name: APPLID JDBC name: DIALOG on table org.hibernate.mapping.Table(sybase10.DCALLS)
Duplicate names found for primarykey. Existing name: APPLID JDBC name: DIALOG on table org.hibernate.mapping.Table(sybase10.DCALLS)
all Tables with single key are fine.
--
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, 4 months