[Hibernate-JIRA] Created: (HHH-5807) Weird characters in license headers lead to compilation errors with UTF-8 character set
by Erik-Berndt Scheper (JIRA)
Weird characters in license headers lead to compilation errors with UTF-8 character set
---------------------------------------------------------------------------------------
Key: HHH-5807
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5807
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 4.0.0.Alpha1
Reporter: Erik-Berndt Scheper
Priority: Trivial
While merging HHH-5750 from 3.6 branch to master, I encountered a build failure for the master branch of hibernate-core. This happened on my ubuntu VM. See the error log below.
{noformat} /java-apps/hibernate-core.git/hibernate-ehcache/src/main/java/org/hibernate/cache/AbstractEhCacheRegionFactory.java:6: unmappable character for encoding UTF8
* statements applied by the authors. �All third-party contributions are
^
/java-apps/hibernate-core.git/hibernate-ehcache/src/main/java/org/hibernate/cache/EhCacheRegionFactory.java:6: unmappable character for encoding UTF8
* statements applied by the authors. �All third-party contributions are
^
/java-apps/hibernate-core.git/hibernate-ehcache/src/main/java/org/hibernate/cache/SingletonEhCacheRegionFactory.java:6: unmappable character for encoding UTF8
* statements applied by the authors. �All third-party contributions are
^
3 errors
FAILURE: Build failed with an exception.
* Where:
Build file '/java-apps/hibernate-core.git/hibernate-ehcache/hibernate-ehcache.gradle'
* What went wrong:
Execution failed for task ':hibernate-ehcache:compileJava'.
Cause: Compile failed; see the compiler error output for details.
* Try:
Run with -s or -d option to get more details. Run with -S option to get the full (very verbose) stacktrace.
BUILD FAILED
Total time: 9 mins 49.619 secs
{noformat}
--
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, 3 months
[Hibernate-JIRA] Created: (ANN-848) Bidirectional Polymorphism
by Yong Joo Jeong (JIRA)
Bidirectional Polymorphism
--------------------------
Key: ANN-848
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-848
Project: Hibernate Annotations
Issue Type: New Feature
Components: binder
Affects Versions: 3.4.0.GA
Environment: 3.4.0.GA, Any database
Reporter: Yong Joo Jeong
I'm trying to implement bidirectional polymorphic class.
Code:
public class Order{
...
@Any( metaColumn = @Column( name = "item_type" ), fetch=FetchType.EAGER )
@AnyMetaDef(
idType = "long",
metaType = "string",
metaValues = {
@MetaValue( value = "ItemA", targetEntity = ItemA.class ),
@MetaValue( value = "ItemB", targetEntity = ItemB.class )
} )
@JoinColumn( name = "item_id" )
Object item;
...
}
And trying to do somthing like the following
Code:
public class ItemA {
@OneToAny // like @OneToMany; in Order table there are "item_id" and "item_type" fields to distinguish ItemA and ItemB
List<Order> orders;
...
}
RoR support this kind of relationship, but I can't find it from Hibernate.
Inheritance with "Table per class" is not an option since it does not support the IDENTITY generator strategy.
Any solution for 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
15 years, 3 months
[Hibernate-JIRA] Created: (HBX-1092) hbm2doc with graphing fails on MacOSX
by Avram Cherry (JIRA)
hbm2doc with graphing fails on MacOSX
-------------------------------------
Key: HBX-1092
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1092
Project: Hibernate Tools
Issue Type: Bug
Components: hbm2doc
Affects Versions: 3.2.0.GA, 3.2.2
Reporter: Avram Cherry
In the method org.hibernate.tool.hbm2x.DocExporter.dotToFile, the portions of the command passed to Runtime.exec() are being passed to an escape(String) method that optionally adds quotes to the executable file path and the path to the input file, but only if the OS is not linux. MacOSX is not linux, but adding quotes causes exec() to fail.
The solution is to change the following statement:
String exeCmd = escape(dotExeFileName) + " -T" + getFormatForFile(outFileName) + " " + escape(dotFileName) + " -o " + escape(outFileName);
to:
String[] exeCmd = new String[] {dotExeFileName, " -T", getFormatForFile(outFileName), dotFileName, " -o ", outFileName};
If you pass the command and arguments as separate strings within an array to Runtime.exec() you do not need to quote filenames, regardless of platform.
A (potentially very harmful) workaround is to pass -Dos.name=Linux to the VM.
Please note that I've checked both the 3.2 branch and trunk and both contain the same 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, 3 months
[Hibernate-JIRA] Created: (HHH-5265) @Formula adds a this_. prefix to an SQL function
by Matthias Bosshard (JIRA)
@Formula adds a this_. prefix to an SQL function
------------------------------------------------
Key: HHH-5265
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5265
Project: Hibernate Core
Issue Type: Bug
Components: annotations, core
Affects Versions: 3.5.2
Environment: Hibernate 3.5.2, with a SQL Anywhere 10 and the org.hibernate.dialect.SybaseDialect
Reporter: Matthias Bosshard
With Hibernate 3.5.2 the ISNULL/COALESCE SQL statement in the following @Formula is prefixed with a this_. An so its no valid SQL.
The annotation:
@Formula( "(SELECT ISNULL ( (SELECT 1 WHERE EXISTS (SELECT * FROM org.usertable as user WHERE user.user_id = user_id)), 0))" )
The SQL part for this formula:
(SELECT *this_.ISNULL* ( (SELECT 1 WHERE EXISTS (SELECT * FROM org.usertable as user WHERE user.user_id = this_.user_id)), 0)) as formula8_1_,
-> thats invalid SQL
In Hibernate 3.5.1 the SQL is pretty the same, but without this_. before ISNULL.
(SELECT *ISNULL* ( (SELECT 1 WHERE EXISTS (SELECT * FROM org.usertable as user WHERE user.user_id = this_.user_id)), 0)) as formula8_1_,
--
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, 3 months
[Hibernate-JIRA] Created: (HHH-3824) OneToOne join by Non-primary key column throws PropertyAccessException when join column is String
by sathish (JIRA)
OneToOne join by Non-primary key column throws PropertyAccessException when join column is String
-------------------------------------------------------------------------------------------------
Key: HHH-3824
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3824
Project: Hibernate Core
Issue Type: Bug
Components: query-criteria, query-hql
Affects Versions: 3.3.1
Environment: Microsoft SQL server 2005, Hibernate 3.3.1
Reporter: sathish
Attachments: trace.txt
When i try to join 2 entities by OneToOne using a Non-primary key column, it throws the following exception:
org.hibernate.PropertyAccessException: could not get a field value by reflection getter of com.xxx.domain.Inventory.sku
Caused by: java.lang.IllegalArgumentException: Can not set java.lang.String field com.inwk.estore.server.domain.Inventory.sku to java.lang.Integer
[Full stacktrace attached]
sku is the Non-primary key String join column by which im trying to do a OneToOne join between Item and Inventory entity.
Apparently its trying to interpret Sku as an Integer column. Adding columnDefinition as VARCHAR/String doesn't help either
Mappings for Item and Inventory are below:
class Item{
@Id
Long id;
@Column
String sku;
//some more properties
@OneToOne(optional = true)
@JoinColumn(name = "sku", referencedColumnName = "sku", insertable = false, updatable = false)
Inventory inventory;
}
class Inventory{
@Id
Long id
@Column
String sku
@Column
Long quantity;
}
--
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, 3 months