[Hibernate-JIRA] Commented: (HHH-1470) Enhance Hibernate-Mapping DTD Definition of type element
by Michael Plöd (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1470?page=c... ]
Michael Plöd commented on HHH-1470:
-----------------------------------
Max,
here is my patch. I would be really really good if you could apply this in a future release:
Index: /Users/mploed/Documents/Java/workspace/Hibernate3/src/org/hibernate/hibernate-mapping-3.0.dtd
===================================================================
--- /Users/mploed/Documents/Java/workspace/Hibernate3/src/org/hibernate/hibernate-mapping-3.0.dtd (revision 10307)
+++ /Users/mploed/Documents/Java/workspace/Hibernate3/src/org/hibernate/hibernate-mapping-3.0.dtd (working copy)
@@ -725,11 +725,11 @@
<!-- Declares the element type of a collection of basic type -->
-<!ELEMENT element (column|formula)*>
+<!ELEMENT element (column|formula|type)*>
<!ATTLIST element column CDATA #IMPLIED>
<!ATTLIST element node CDATA #IMPLIED>
<!ATTLIST element formula CDATA #IMPLIED>
- <!ATTLIST element type CDATA #REQUIRED>
+ <!ATTLIST element type CDATA #IMPLIED>
<!ATTLIST element length CDATA #IMPLIED>
<!ATTLIST element precision CDATA #IMPLIED>
<!ATTLIST element scale CDATA #IMPLIED>
> Enhance Hibernate-Mapping DTD Definition of type element
> --------------------------------------------------------
>
> Key: HHH-1470
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1470
> Project: Hibernate3
> Type: Improvement
> Environment: Hibernate 3.1.x
> Reporter: Michael Plöd
> Priority: Trivial
>
>
> As discussed with Steve in http://forum.hibernate.org/viewtopic.php?t=955303
> Could you please update the DTD Definition of "Element" as follows:
> <!ELEMENT element (column|formula|type)*>
> <!ATTLIST element column CDATA #IMPLIED>
> <!ATTLIST element node CDATA #IMPLIED>
> <!ATTLIST element formula CDATA #IMPLIED>
> <!ATTLIST element type CDATA #IMPLIED>
> <!ATTLIST element length CDATA #IMPLIED>
> <!ATTLIST element precision CDATA #IMPLIED>
> <!ATTLIST element scale CDATA #IMPLIED>
> <!ATTLIST element not-null (true|false) "false">
> <!ATTLIST element unique (true|false) "false">
> Actually type should be enabled as a child element of Element allowing users to add a parameter to a parameterized UserType inside an Element definition. Right now users will have to create a typedef with the parameter and place the name of the typedef in the attribute type. In addition to that the attribute definition of type must be set to IMPLIED.
> This would enalbe a mapping like that:
> <set name="ples" table="MY_PLES_TABLE">
> <key column="myClassId"/>
> <element>
> <type name="my.comp.common.hibernate.PleType">
> <param name="type">my.comp.domain.PleElement</param>
> </type>
> </element>
> </set>
--
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
18 years, 4 months
[Hibernate-JIRA] Commented: (HHH-1806) No Dialect mapping for JDBC type: 3
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1806?page=c... ]
Steve Ebersole commented on HHH-1806:
-------------------------------------
to me it seems to make more sense to:
1) register the hibernate type mapping at the Dialect-level. For all/most databases, DECIMAL should also map to Hibernate'd BigDecimalType
2) register the datatype at the Oracle9Dialect-level, since this is true of all Oracle setups. Apparently the distinction is that the Oracle drivers just never report DECIMAL types?
> No Dialect mapping for JDBC type: 3
> -----------------------------------
>
> Key: HHH-1806
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1806
> Project: Hibernate3
> Type: Bug
> Components: core
> Versions: 3.1.2, 3.1.3
> Environment: Oracle JDBC driver with the Hibernate DataDirectOracle9Dialect.
> Reporter: amit bhayani
>
>
> Hibernate throws "No Dialect mapping for JDBC type: 3" when using Oracle JDBC driver with the Hibernate DataDirectOracle9Dialect.
> DataDirect Connect for JDBC Oracle driver returns the JDBC type DECIMAL for some result set columns however there was no mapping set up in the DataDirectOracle9Dialect for the DECIMAL JDBC type.
> The work arround for issue is to add the following constructor to DataDirectOracle9Dialect
> public DataDirectOracle9Dialect() {
> super();
> registerColumnType( Types.DECIMAL, "number($p,$s)" );
> registerHibernateType(Types.DECIMAL, "big_decimal");
> }
> Can Hibernate Team add this constructor or something similar to the DataDirectOracle9Dialect?
> Version Info
> Hibernate: 3.1.3
> DataDirect
> Connect for JDBC
> Oracle driver: 3.5.40
> Forum reference http://forum.hibernate.org/viewtopic.php?t=959583&highlight=dialect+mappi...
--
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
18 years, 4 months
[Hibernate-JIRA] Commented: (HHH-1851) "special" identifier property in HQL unnecessaryily causing problems
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1851?page=c... ]
Steve Ebersole commented on HHH-1851:
-------------------------------------
Regardless, this still requires significant code changes.
I will get to it; but I have much more pressing things to work on. If you want to work on a patch, I'll take a look at your patch and prioritize this up higher...
> "special" identifier property in HQL unnecessaryily causing problems
> --------------------------------------------------------------------
>
> Key: HHH-1851
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1851
> Project: Hibernate3
> Type: Improvement
> Components: query-hql
> Versions: 3.0 alpha, 3.0 beta 1, 3.0 beta 2, 3.0 beta 3, 3.0 beta 4, 3.0 rc 1, 3.0 final, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.1 beta 1, 3.1 beta 2, 3.1 rc 1, 3.1 rc2, 3.1 rc3, 3.1, 3.1.1, 3.1.2, 3.1.3
> Environment: independent, all versions all databases.
> Reporter: Gunther Schadow
>
> Original Estimate: 1 hour
> Remaining: 1 hour
>
> I HAVE REPORTED THIS PROBLEM BEFORE IN HHH-1127. THEN IT WAS FLAGGED AS "DUPLICATE" AND CLOSED PLEASE TELL ME WHAT IS THE ID OF THE REPORT WHICH THIS SUPPOSEDLY DUPLICATES?
> When a user decides to use the name "id" as the name of a property, HQL queries break with unspecific exceptions, because HQL assumes "id" as reserved for the Hibernate id attribute defined in the hbm file using the <id .../> tag. This is bad design in our view, because it puts an unnecessary constraint and interference with the otherwise transparent "object persistence for idiomatic Java."
> For example, a mapping file may contain:
> <class name="MyObject">
> <id name="internalId" ... />
> <property name="id" .../>
> <property name="foo" .../>
> </class>
> And since even the <id .../> element has a @name property, why can't HQL use that name rather than shadowing a perfectly good identifier for a normal property?
> The HQL query
> from MyObject where id='123'
> and this would fail because 'id' in HQL means the 'internalId' property not the property called 'id'. But if I wanted to access the internalId I could just as well have sayd:
> from MyObject where internalId='123'
> I do not understand the value of this feature and it is causing us tremendous problems, because our object property names are fixed by some larger standards body and I can't just replace "id" with some other name just because of HQL!
> I am currently hacking every version of Hibernate by changing only one line in
> org.hibernate.persister.entity.EntityPersister
> from
> public static final String ENTITY_ID = "id";
> to
> public static final String ENTITY_ID = "hid";
> But that of course is a problem and also breaking it for anyone who uses "hid" as a normal property name.
> I really don't understand what the value of this feature is and I am asking you to drop it alltogether or turn it into some really weird name or some function, whatever, but this "special" id attribute really, really hurts.
> Please, if you close this issue again, at least comment about your rationale or link it with the bug where it had been discussed. Thank you!
--
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
18 years, 4 months
[Hibernate-JIRA] Commented: (HHH-1851) "special" identifier property in HQL unnecessaryily causing problems
by Gunther Schadow (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1851?page=c... ]
Gunther Schadow commented on HHH-1851:
--------------------------------------
Emmanuel, I may fail to see the utility of objects "not holding an id property" (and yet having one mapped), but you don't need the "special id property name" for this. If I define an <id> in the mapping I can set the name and if it is important not to map to an object, then can't one just specify another attribute such as virtual="yes"?
<id name="internalId" column="INTERNAL_ID" virtual="yes"> ...</id>
then I can write HQL as ... WHERE internalId='123' and still avoid to shadow the name "id" as a normal property name.
> "special" identifier property in HQL unnecessaryily causing problems
> --------------------------------------------------------------------
>
> Key: HHH-1851
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1851
> Project: Hibernate3
> Type: Improvement
> Components: query-hql
> Versions: 3.0 alpha, 3.0 beta 1, 3.0 beta 2, 3.0 beta 3, 3.0 beta 4, 3.0 rc 1, 3.0 final, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.1 beta 1, 3.1 beta 2, 3.1 rc 1, 3.1 rc2, 3.1 rc3, 3.1, 3.1.1, 3.1.2, 3.1.3
> Environment: independent, all versions all databases.
> Reporter: Gunther Schadow
>
> Original Estimate: 1 hour
> Remaining: 1 hour
>
> I HAVE REPORTED THIS PROBLEM BEFORE IN HHH-1127. THEN IT WAS FLAGGED AS "DUPLICATE" AND CLOSED PLEASE TELL ME WHAT IS THE ID OF THE REPORT WHICH THIS SUPPOSEDLY DUPLICATES?
> When a user decides to use the name "id" as the name of a property, HQL queries break with unspecific exceptions, because HQL assumes "id" as reserved for the Hibernate id attribute defined in the hbm file using the <id .../> tag. This is bad design in our view, because it puts an unnecessary constraint and interference with the otherwise transparent "object persistence for idiomatic Java."
> For example, a mapping file may contain:
> <class name="MyObject">
> <id name="internalId" ... />
> <property name="id" .../>
> <property name="foo" .../>
> </class>
> And since even the <id .../> element has a @name property, why can't HQL use that name rather than shadowing a perfectly good identifier for a normal property?
> The HQL query
> from MyObject where id='123'
> and this would fail because 'id' in HQL means the 'internalId' property not the property called 'id'. But if I wanted to access the internalId I could just as well have sayd:
> from MyObject where internalId='123'
> I do not understand the value of this feature and it is causing us tremendous problems, because our object property names are fixed by some larger standards body and I can't just replace "id" with some other name just because of HQL!
> I am currently hacking every version of Hibernate by changing only one line in
> org.hibernate.persister.entity.EntityPersister
> from
> public static final String ENTITY_ID = "id";
> to
> public static final String ENTITY_ID = "hid";
> But that of course is a problem and also breaking it for anyone who uses "hid" as a normal property name.
> I really don't understand what the value of this feature is and I am asking you to drop it alltogether or turn it into some really weird name or some function, whatever, but this "special" id attribute really, really hurts.
> Please, if you close this issue again, at least comment about your rationale or link it with the bug where it had been discussed. Thank you!
--
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
18 years, 4 months
[Hibernate-JIRA] Commented: (HHH-1470) Enhance Hibernate-Mapping DTD Definition of type element
by Michael Plöd (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1470?page=c... ]
Michael Plöd commented on HHH-1470:
-----------------------------------
Excellent. As I said.. I'll submit the patch tonight.
> Enhance Hibernate-Mapping DTD Definition of type element
> --------------------------------------------------------
>
> Key: HHH-1470
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1470
> Project: Hibernate3
> Type: Improvement
> Environment: Hibernate 3.1.x
> Reporter: Michael Plöd
> Priority: Trivial
>
>
> As discussed with Steve in http://forum.hibernate.org/viewtopic.php?t=955303
> Could you please update the DTD Definition of "Element" as follows:
> <!ELEMENT element (column|formula|type)*>
> <!ATTLIST element column CDATA #IMPLIED>
> <!ATTLIST element node CDATA #IMPLIED>
> <!ATTLIST element formula CDATA #IMPLIED>
> <!ATTLIST element type CDATA #IMPLIED>
> <!ATTLIST element length CDATA #IMPLIED>
> <!ATTLIST element precision CDATA #IMPLIED>
> <!ATTLIST element scale CDATA #IMPLIED>
> <!ATTLIST element not-null (true|false) "false">
> <!ATTLIST element unique (true|false) "false">
> Actually type should be enabled as a child element of Element allowing users to add a parameter to a parameterized UserType inside an Element definition. Right now users will have to create a typedef with the parameter and place the name of the typedef in the attribute type. In addition to that the attribute definition of type must be set to IMPLIED.
> This would enalbe a mapping like that:
> <set name="ples" table="MY_PLES_TABLE">
> <key column="myClassId"/>
> <element>
> <type name="my.comp.common.hibernate.PleType">
> <param name="type">my.comp.domain.PleElement</param>
> </type>
> </element>
> </set>
--
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
18 years, 4 months
[Hibernate-JIRA] Commented: (HHH-1470) Enhance Hibernate-Mapping DTD Definition of type element
by Max Rydahl Andersen (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1470?page=c... ]
Max Rydahl Andersen commented on HHH-1470:
------------------------------------------
not related to annotations so that part doesn't matter.
> Enhance Hibernate-Mapping DTD Definition of type element
> --------------------------------------------------------
>
> Key: HHH-1470
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1470
> Project: Hibernate3
> Type: Improvement
> Environment: Hibernate 3.1.x
> Reporter: Michael Plöd
> Priority: Trivial
>
>
> As discussed with Steve in http://forum.hibernate.org/viewtopic.php?t=955303
> Could you please update the DTD Definition of "Element" as follows:
> <!ELEMENT element (column|formula|type)*>
> <!ATTLIST element column CDATA #IMPLIED>
> <!ATTLIST element node CDATA #IMPLIED>
> <!ATTLIST element formula CDATA #IMPLIED>
> <!ATTLIST element type CDATA #IMPLIED>
> <!ATTLIST element length CDATA #IMPLIED>
> <!ATTLIST element precision CDATA #IMPLIED>
> <!ATTLIST element scale CDATA #IMPLIED>
> <!ATTLIST element not-null (true|false) "false">
> <!ATTLIST element unique (true|false) "false">
> Actually type should be enabled as a child element of Element allowing users to add a parameter to a parameterized UserType inside an Element definition. Right now users will have to create a typedef with the parameter and place the name of the typedef in the attribute type. In addition to that the attribute definition of type must be set to IMPLIED.
> This would enalbe a mapping like that:
> <set name="ples" table="MY_PLES_TABLE">
> <key column="myClassId"/>
> <element>
> <type name="my.comp.common.hibernate.PleType">
> <param name="type">my.comp.domain.PleElement</param>
> </type>
> </element>
> </set>
--
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
18 years, 4 months
[Hibernate-JIRA] Commented: (HHH-1470) Enhance Hibernate-Mapping DTD Definition of type element
by Michael Plöd (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1470?page=c... ]
Michael Plöd commented on HHH-1470:
-----------------------------------
Yes, I have verified that it works.
But I'm not too sure about the Annotation's side of Hibernate.
I will prepare a patch tonight and submit it to this task.
> Enhance Hibernate-Mapping DTD Definition of type element
> --------------------------------------------------------
>
> Key: HHH-1470
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1470
> Project: Hibernate3
> Type: Improvement
> Environment: Hibernate 3.1.x
> Reporter: Michael Plöd
> Priority: Trivial
>
>
> As discussed with Steve in http://forum.hibernate.org/viewtopic.php?t=955303
> Could you please update the DTD Definition of "Element" as follows:
> <!ELEMENT element (column|formula|type)*>
> <!ATTLIST element column CDATA #IMPLIED>
> <!ATTLIST element node CDATA #IMPLIED>
> <!ATTLIST element formula CDATA #IMPLIED>
> <!ATTLIST element type CDATA #IMPLIED>
> <!ATTLIST element length CDATA #IMPLIED>
> <!ATTLIST element precision CDATA #IMPLIED>
> <!ATTLIST element scale CDATA #IMPLIED>
> <!ATTLIST element not-null (true|false) "false">
> <!ATTLIST element unique (true|false) "false">
> Actually type should be enabled as a child element of Element allowing users to add a parameter to a parameterized UserType inside an Element definition. Right now users will have to create a typedef with the parameter and place the name of the typedef in the attribute type. In addition to that the attribute definition of type must be set to IMPLIED.
> This would enalbe a mapping like that:
> <set name="ples" table="MY_PLES_TABLE">
> <key column="myClassId"/>
> <element>
> <type name="my.comp.common.hibernate.PleType">
> <param name="type">my.comp.domain.PleElement</param>
> </type>
> </element>
> </set>
--
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
18 years, 4 months
[Hibernate-JIRA] Commented: (HHH-1470) Enhance Hibernate-Mapping DTD Definition of type element
by Max Rydahl Andersen (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1470?page=c... ]
Max Rydahl Andersen commented on HHH-1470:
------------------------------------------
patches always help .... have you verified it works too ? :)
> Enhance Hibernate-Mapping DTD Definition of type element
> --------------------------------------------------------
>
> Key: HHH-1470
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1470
> Project: Hibernate3
> Type: Improvement
> Environment: Hibernate 3.1.x
> Reporter: Michael Plöd
> Priority: Trivial
>
>
> As discussed with Steve in http://forum.hibernate.org/viewtopic.php?t=955303
> Could you please update the DTD Definition of "Element" as follows:
> <!ELEMENT element (column|formula|type)*>
> <!ATTLIST element column CDATA #IMPLIED>
> <!ATTLIST element node CDATA #IMPLIED>
> <!ATTLIST element formula CDATA #IMPLIED>
> <!ATTLIST element type CDATA #IMPLIED>
> <!ATTLIST element length CDATA #IMPLIED>
> <!ATTLIST element precision CDATA #IMPLIED>
> <!ATTLIST element scale CDATA #IMPLIED>
> <!ATTLIST element not-null (true|false) "false">
> <!ATTLIST element unique (true|false) "false">
> Actually type should be enabled as a child element of Element allowing users to add a parameter to a parameterized UserType inside an Element definition. Right now users will have to create a typedef with the parameter and place the name of the typedef in the attribute type. In addition to that the attribute definition of type must be set to IMPLIED.
> This would enalbe a mapping like that:
> <set name="ples" table="MY_PLES_TABLE">
> <key column="myClassId"/>
> <element>
> <type name="my.comp.common.hibernate.PleType">
> <param name="type">my.comp.domain.PleElement</param>
> </type>
> </element>
> </set>
--
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
18 years, 4 months
[Hibernate-JIRA] Commented: (HHH-1470) Enhance Hibernate-Mapping DTD Definition of type element
by Michael Plöd (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1470?page=c... ]
Michael Plöd commented on HHH-1470:
-----------------------------------
Hi,
do you want me to post a patch for this issue? Or why has it not been touched yet?
Cheers,
Mike
> Enhance Hibernate-Mapping DTD Definition of type element
> --------------------------------------------------------
>
> Key: HHH-1470
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1470
> Project: Hibernate3
> Type: Improvement
> Environment: Hibernate 3.1.x
> Reporter: Michael Plöd
> Priority: Trivial
>
>
> As discussed with Steve in http://forum.hibernate.org/viewtopic.php?t=955303
> Could you please update the DTD Definition of "Element" as follows:
> <!ELEMENT element (column|formula|type)*>
> <!ATTLIST element column CDATA #IMPLIED>
> <!ATTLIST element node CDATA #IMPLIED>
> <!ATTLIST element formula CDATA #IMPLIED>
> <!ATTLIST element type CDATA #IMPLIED>
> <!ATTLIST element length CDATA #IMPLIED>
> <!ATTLIST element precision CDATA #IMPLIED>
> <!ATTLIST element scale CDATA #IMPLIED>
> <!ATTLIST element not-null (true|false) "false">
> <!ATTLIST element unique (true|false) "false">
> Actually type should be enabled as a child element of Element allowing users to add a parameter to a parameterized UserType inside an Element definition. Right now users will have to create a typedef with the parameter and place the name of the typedef in the attribute type. In addition to that the attribute definition of type must be set to IMPLIED.
> This would enalbe a mapping like that:
> <set name="ples" table="MY_PLES_TABLE">
> <key column="myClassId"/>
> <element>
> <type name="my.comp.common.hibernate.PleType">
> <param name="type">my.comp.domain.PleElement</param>
> </type>
> </element>
> </set>
--
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
18 years, 4 months