[Hibernate-JIRA] Commented: (HHH-1189) interfaces for Proxies are not regonized as interfaces
by Paul Benedict (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189?page=c... ]
Paul Benedict commented on HHH-1189:
------------------------------------
This issue now has a test case. Can it be looked at again for 3.3?
Our development has the same issue: we query for a list of AbstractItems, which implement the Item interface, but the concrete subclasses also have specific interfaces. Currently, we cannot cast to those subinterfaces through a proxy.
> interfaces for Proxies are not regonized as interfaces
> ------------------------------------------------------
>
> Key: HHH-1189
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189
> Project: Hibernate3
> Issue Type: Patch
> Components: core
> Affects Versions: 3.1 rc3
> Environment: Discovered on Hibernate 3.0, still present in 3.1rc3
> Reporter: Tobias
> Assignee: Steve Ebersole
> Priority: Critical
> Attachments: eg.zip
>
> Original Estimate: 1 hour
> Remaining Estimate: 1 hour
>
> In org.hibernate.tuple.PojoEntityTuplizer line 119 reads:
> if ( !proxyInterface.isInterface() ) {
> and should be
> if ( !subclassClass.isInterface() ) {
> So the code then would look like this:
> Subclass subclass = ( Subclass ) iter.next();
> Class subclassProxy = subclass.getProxyInterface();
> Class subclassClass = subclass.getMappedClass();
> if ( subclassProxy!=null && !subclassClass.equals( subclassProxy ) ) {
> if ( !subclassProxy.isInterface() ) { // HERE!
> throw new MappingException(
> "proxy must be either an interface, or the class itself: " +
> subclass.getEntityName()
> );
> }
> proxyInterfaces.add( subclassProxy );
> }
> After that change the specified interfaces for subclass proxies are regonized as such. Without this patch the superclass is checked, which may not have/be an interface as proxy class.
--
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
16 years, 9 months
[Hibernate-JIRA] Created: (HHH-3292) Bug Oracle9iDialect Pagination
by Mizael Montenegro (JIRA)
Bug Oracle9iDialect Pagination
------------------------------
Key: HHH-3292
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3292
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.6
Environment: Java2 6.0, Oracle 10i, Hibernate 3.2.6
Reporter: Mizael Montenegro
Priority: Critical
Hi, I found a flaw in the dialect of the oracle, the pagination doesn't work correctly, my English is terrible, then I cannot describe the complete problem here, more I will post the string sql that solves the problem.
select * from ( SELECT x.*, rownum as r FROM ( "CONSULT SQL" ) x ) where r between ? AND ?
setInt(1, BEGIN);
setInt(2, END);
I altered the dialect and it perfectly worked with that solution. The largest problem is when ordination, the order is used using pagination corresponds never to the exact return of the original consultation.
--
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
16 years, 9 months
[Hibernate-JIRA] Created: (HHH-3322) Entity will not create
by scott duke (JIRA)
Entity will not create
----------------------
Key: HHH-3322
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3322
Project: Hibernate3
Issue Type: Bug
Affects Versions: 3.2.6
Environment: JBoss4.2.2.GA, MySQL 5.0, Windows XP
Reporter: scott duke
Priority: Trivial
A couple of days ago I was trying to create a new entity called "InFile". I have about 5 other entities which do not have any problem, except for the one called InFile. If I rename the entity to InFile2, the problem doesn't occur. The problem is during the application server startup trying to create the database table in MySQL. When I take the SQL script and run it in the MySQL browser, it gets created. I do not know if this is a hibernate issue or MySQL issue.
I found that "infile" is a reserved word in MySQL 5.0, but if it allows me to create the database table from MySQL browser, shouldn't it allow me to create it when I have it defined as an entity?
Below you will see what the log file created.
2008-05-31 09:05:57,812 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] Running hbm2ddl schema export
2008-05-31 09:05:57,812 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] exporting generated schema to database
2008-05-31 09:05:57,812 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
alter table Address
drop
foreign key FK1ED033D411ACF83E
2008-05-31 09:05:57,968 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
alter table Address
drop
foreign key FK1ED033D4C11DB190
2008-05-31 09:05:58,125 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
alter table UzerRoles
drop
foreign key FK621DB3AB3DA02DB8
2008-05-31 09:05:58,250 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
alter table UzerRoles
drop
foreign key FK621DB3AB11ACF83E
2008-05-31 09:05:58,437 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
drop table if exists Address
2008-05-31 09:05:58,453 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
drop table if exists CityStateZip
2008-05-31 09:05:58,468 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
drop table if exists ImportFile
2008-05-31 09:05:58,468 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
drop table if exists InFile
2008-05-31 09:05:58,484 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: drop table if exists InFile
2008-05-31 09:05:58,484 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'InFile' at line 1
2008-05-31 09:05:58,484 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
drop table if exists InFile2
2008-05-31 09:05:58,484 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
drop table if exists Uzer
2008-05-31 09:05:58,515 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
drop table if exists UzerRole
2008-05-31 09:05:58,531 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
drop table if exists UzerRoles
2008-05-31 09:05:58,578 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
create table Address (
id bigint not null auto_increment,
type varchar(255),
version integer,
addressee1 varchar(255),
addressee2 varchar(255),
address1 varchar(255),
address2 varchar(255),
createdOn datetime,
LastUsedOn datetime,
cityStateZipId bigint not null,
uzerId bigint not null,
primary key (id)
)
2008-05-31 09:05:58,687 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
create table CityStateZip (
id bigint not null auto_increment,
country varchar(255),
version integer,
zipcode varchar(255),
latitude float,
longitude float,
city varchar(255),
province varchar(255),
county varchar(255),
zipclass varchar(255),
primary key (id)
)
2008-05-31 09:05:58,734 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
create table ImportFile (
id bigint not null auto_increment,
name varchar(20),
type integer,
version integer,
status integer,
createdOn datetime,
primary key (id)
)
2008-05-31 09:05:58,812 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
create table InFile (
id bigint not null auto_increment,
name varchar(20),
version integer,
primary key (id)
)
2008-05-31 09:05:58,812 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: create table InFile (id bigint not null auto_increment, name varchar(20), version integer, primary key (id))
2008-05-31 09:05:58,812 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'InFile (id bigint not null auto_increment, name varchar(20), version integer, pr' at line 1
2008-05-31 09:05:58,812 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
create table InFile2 (
id bigint not null auto_increment,
name varchar(20),
version integer,
primary key (id)
)
2008-05-31 09:05:58,906 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
create table Uzer (
id bigint not null auto_increment,
name varchar(40),
version integer,
uzername varchar(20),
hashedPassword varchar(255),
company varchar(50),
email varchar(255),
primaryPhone varchar(20),
primaryExt varchar(10),
secondaryPhone varchar(20),
secondaryExt varchar(10),
uzerSince date,
primary key (id)
)
2008-05-31 09:05:58,984 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
create table UzerRole (
id bigint not null auto_increment,
name varchar(20),
version integer,
primary key (id)
)
2008-05-31 09:05:59,281 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
create table UzerRoles (
uzerId bigint not null,
roleId bigint not null
)
2008-05-31 09:05:59,343 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
alter table Address
add index FK1ED033D411ACF83E (uzerId),
add constraint FK1ED033D411ACF83E
foreign key (uzerId)
references Uzer (id)
2008-05-31 09:05:59,468 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
alter table Address
add index FK1ED033D4C11DB190 (cityStateZipId),
add constraint FK1ED033D4C11DB190
foreign key (cityStateZipId)
references CityStateZip (id)
2008-05-31 09:05:59,593 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
alter table UzerRoles
add index FK621DB3AB3DA02DB8 (roleId),
add constraint FK621DB3AB3DA02DB8
foreign key (roleId)
references UzerRole (id)
2008-05-31 09:05:59,765 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport]
alter table UzerRoles
add index FK621DB3AB11ACF83E (uzerId),
add constraint FK621DB3AB11ACF83E
foreign key (uzerId)
references Uzer (id)
2008-05-31 09:05:59,906 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] Executing import script: /import.sql
--
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
16 years, 9 months