From: <no...@at...> - 2005-05-06 15:38:36
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-446 Here is an overview of the issue: --------------------------------------------------------------------- Key: HHH-446 Summary: The is no possibility to specify embed-xml on key-many-to-one tag Type: Bug Status: Unassigned Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate3 Components: core Versions: 3.0.2 Assignee: Reporter: Markus Jessenitschnig Created: Fri, 6 May 2005 10:38 AM Updated: Fri, 6 May 2005 10:38 AM Environment: MySQL Description: It is not possible to specify embed-xml="false" on key-many-to-one tags within composite-id tag like it is possible for many-to-one relations. --------------------------------------------------------------------- JIRA INFORMATION: 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.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <no...@at...> - 2005-05-07 15:25:30
|
The following issue has been updated: Updater: Gavin King (mailto:ga...@hi...) Date: Sat, 7 May 2005 10:24 AM Comment: I'm not at all sure that use of <key-many-to-one> with XML is a good thing. Changes: type changed from Bug to Improvement priority changed from Major to Minor --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/browse/HHH-446?page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-446 Here is an overview of the issue: --------------------------------------------------------------------- Key: HHH-446 Summary: The is no possibility to specify embed-xml on key-many-to-one tag Type: Improvement Status: Unassigned Priority: Minor Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate3 Components: core Versions: 3.0.2 Assignee: Reporter: Markus Jessenitschnig Created: Fri, 6 May 2005 10:38 AM Updated: Sat, 7 May 2005 10:24 AM Environment: MySQL Description: It is not possible to specify embed-xml="false" on key-many-to-one tags within composite-id tag like it is possible for many-to-one relations. --------------------------------------------------------------------- JIRA INFORMATION: 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.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <no...@at...> - 2005-08-18 16:34:04
|
The following comment has been added to this issue: Author: Martin Zdila Created: Thu, 18 Aug 2005 11:31 AM Body: Hello > I'm not at all sure that use of <key-many-to-one> with XML is a good thing. Why? Imagine this hibernate mapping: <hibernate-mapping> <class name="com.kovine.kfe.dao.Widget" table="KFE_WIDGET" abstract="true" lazy="false"> ... <many-to-one unique="true" name="labelMessageKey" column="LABEL_KEY_ID" not-null="true" cascade="all" class="com.kovine.kfe.dao.MessageKey" /> ... </class> <class name="com.kovine.kfe.dao.MessageKey" table="KFE_MESSAGE_KEY"> <id name="id" column="MESSAGE_KEY_ID" node="@id"> <generator class="native"> <param name="sequence">KFE_MESSAGE_KEY_ID_SEQ</param> </generator> </id> <property name="key" column="MESSAGE_KEY" not-null="false" unique="true"/> <map name="messages" cascade="all" inverse="true" order-by="LANGUAGE_ID"> <key column="MESSAGE_KEY_ID" /> <map-key type="java.lang.String" formula="LANGUAGE_ID" /> <one-to-many class="com.kovine.kfe.dao.Message" /> </map> </class> <class name="com.kovine.kfe.dao.Message" table="KFE_MESSAGE"> <composite-id> <key-many-to-one name="language" column="LANGUAGE_ID" class="com.kovine.kfe.dao.Language" /> <key-many-to-one name="messageKey" column="MESSAGE_KEY_ID" class="com.kovine.kfe.dao.MessageKey" /> </composite-id> <property name="value" column="MESSAGE_VALUE" length="255" /> </class> <class name="com.kovine.kfe.dao.Language" table="KFE_LANGUAGE" mutable="false"> <id name="id" unsaved-value="null" column="LANGUAGE_ID" node="@id" /> <property name="code" column="CODE" length="3" not-null="true" /> <property name="language" column="LANGUAGE" length="32" not-null="true" /> </class> </hibernate-mapping> It would be just fine if the generated XML was: ... <labelMessageKey id="776"> <messages> <Message> <language id="en" /> <messageKey id="776" /> <value>Thing</value> </Message> <Message> <language id="de" /> <messageKey id="776" /> <value>Sache</value> <Message> <Message> <language id="sk" /> <messageKey id="776" /> <value>Vec</value> <Message> </messages> </labelMessageKey> ... Please look at this issue (priority = at least medium ;-) ). -- Martin Zdila --------------------------------------------------------------------- View this comment: http://opensource.atlassian.com/projects/hibernate/browse/HHH-446?page=comments#action_19395 --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-446 Here is an overview of the issue: --------------------------------------------------------------------- Key: HHH-446 Summary: The is no possibility to specify embed-xml on key-many-to-one tag Type: Improvement Status: Unassigned Priority: Minor Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate3 Components: core Versions: 3.0.2 Assignee: Reporter: Markus Jessenitschnig Created: Fri, 6 May 2005 10:38 AM Updated: Thu, 18 Aug 2005 11:31 AM Environment: MySQL Description: It is not possible to specify embed-xml="false" on key-many-to-one tags within composite-id tag like it is possible for many-to-one relations. --------------------------------------------------------------------- JIRA INFORMATION: 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.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <no...@at...> - 2005-08-19 11:23:44
|
The following comment has been added to this issue: Author: Martin Zdila Created: Fri, 19 Aug 2005 6:23 AM Body: I've modified hibernate-mapping-3.0.dtd and I've added <!ATTLIST key-many-to-one embed-xml (true|false) "true"> to see the mirracle. But I didn't. What I saw was the same exception + stack trace as in HHH-796: java.lang.NullPointerException at org.hibernate.type.EntityType.getIdentifierType(EntityType.java:227) at org.hibernate.type.EntityType.setToXMLNode(EntityType.java:422) at org.hibernate.property.Dom4jAccessor$ElementSetter.set(Dom4jAccessor.java:307) at org.hibernate.tuple.AbstractComponentTuplizer.setPropertyValues(AbstractComponentTuplizer.java:80) at org.hibernate.type.ComponentType.setPropertyValues(ComponentType.java:262)a:262) ... So maybe theese thwo issues are a bit related. The NullPointerException is caused because factory is null and factory is null, because of: setters[i].set( component, values[i], null /* this is the factory */ ); in org.hibernate.tuple.AbstractComponentTuplizer.setPropertyValues(AbstractComponentTuplizer.java:80) I am not a hibernate hacker, I just want to help a bit. I hope I did :-). --------------------------------------------------------------------- View this comment: http://opensource.atlassian.com/projects/hibernate/browse/HHH-446?page=comments#action_19418 --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-446 Here is an overview of the issue: --------------------------------------------------------------------- Key: HHH-446 Summary: The is no possibility to specify embed-xml on key-many-to-one tag Type: Improvement Status: Unassigned Priority: Minor Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate3 Components: core Versions: 3.0.2 Assignee: Reporter: Markus Jessenitschnig Created: Fri, 6 May 2005 10:38 AM Updated: Fri, 19 Aug 2005 6:23 AM Environment: MySQL Description: It is not possible to specify embed-xml="false" on key-many-to-one tags within composite-id tag like it is possible for many-to-one relations. --------------------------------------------------------------------- JIRA INFORMATION: 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.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: Jon S. (JIRA) <no...@at...> - 2005-12-15 02:42:32
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-446?page=comments#action_21271 ] Jon Seymour commented on HHH-446: --------------------------------- I have run into this problem as well and had to change my model to use generated identifiers to get around it. My view is that the natural XML representation of this case is to suppress the link to the parent entity completely, e.g. <labelMessageKey id="776"> <messages> <Message> <language id="en" /> <value>Thing</value> </Message> <Message> <language id="de" /> <value>Sache</value> <Message> <Message> <language id="sk" /> <value>Vec</value> <Message> </messages> </labelMessageKey> > The is no possibility to specify embed-xml on key-many-to-one tag > ----------------------------------------------------------------- > > Key: HHH-446 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-446 > Project: Hibernate3 > Type: Improvement > Components: core > Versions: 3.0.2 > Environment: MySQL > Reporter: Markus Jessenitschnig > Priority: Minor > > > It is not possible to specify embed-xml="false" on key-many-to-one tags within composite-id tag like it is possible for many-to-one relations. -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Martin S. (JIRA) <no...@at...> - 2006-06-13 17:32:42
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-446?page=comments#action_23328 ] Martin Schulz commented on HHH-446: ----------------------------------- > I'm not at all sure that use of <key-many-to-one> with XML is a good thing. I have a many-to-one referencing a child table with a composite id. Conventional wisdom around here tells me that that this is tricky, but can be setup with a key-many-to-one bi-di mapping. I don't really technically _need_ the reverse navigation though though. What I need is to avoid the recursion... The request appears rather reasonable and Gavin's comment censatory. > The is no possibility to specify embed-xml on key-many-to-one tag > ----------------------------------------------------------------- > > Key: HHH-446 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-446 > Project: Hibernate3 > Type: Improvement > Components: core > Versions: 3.0.2 > Environment: MySQL > Reporter: Markus Jessenitschnig > Priority: Minor > > > It is not possible to specify embed-xml="false" on key-many-to-one tags within composite-id tag like it is possible for many-to-one relations. -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Martin S. (JIRA) <no...@at...> - 2006-07-10 16:25:59
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-446?page=comments#action_23584 ] Martin Schulz commented on HHH-446: ----------------------------------- Can someone kindly patch the distributed properties and template files as follows: diff -rbu hibernate-3.2-orig/etc/hibernate.properties hibernate-3.2.0cr3/etc/hibernate.properties --- hibernate-3.2-orig/etc/hibernate.properties 2006-07-06 11:37:46.000000000 -0400 +++ hibernate-3.2.0cr3/etc/hibernate.properties 2006-07-10 11:48:04.000000000 -0400 @@ -374,7 +374,7 @@ #hibernate.use_identifer_rollback true -## enable bytecode reflection optimizer (disabled by default) +## enable CGLIB reflection optimizer (disabled by default) #hibernate.bytecode.use_reflection_optimizer true diff -rbu hibernate-3.2-orig/etc/hibernate.properties.template hibernate-3.2.0cr3/etc/hibernate.properties.template --- hibernate-3.2-orig/etc/hibernate.properties.template 2006-07-06 11:37:46.000000000 -0400 +++ hibernate-3.2.0cr3/etc/hibernate.properties.template 2006-07-10 11:48:08.000000000 -0400 @@ -359,9 +359,9 @@ #hibernate.use_identifer_rollback true -## enable CGLIB reflection optimizer (enabled by default) +## enable CGLIB reflection optimizer (disabled by default) -#hibernate.cglib.use_reflection_optimizer false +#hibernate.bytecode.use_reflection_optimizer true > The is no possibility to specify embed-xml on key-many-to-one tag > ----------------------------------------------------------------- > > Key: HHH-446 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-446 > Project: Hibernate3 > Type: Improvement > Components: core > Versions: 3.0.2 > Environment: MySQL > Reporter: Markus Jessenitschnig > Priority: Minor > > > It is not possible to specify embed-xml="false" on key-many-to-one tags within composite-id tag like it is possible for many-to-one relations. -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Martin S. (JIRA) <no...@at...> - 2006-07-10 16:25:59
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-446?page=comments#action_23585 ] Martin Schulz commented on HHH-446: ----------------------------------- oops. wrong bug. sorry. > The is no possibility to specify embed-xml on key-many-to-one tag > ----------------------------------------------------------------- > > Key: HHH-446 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-446 > Project: Hibernate3 > Type: Improvement > Components: core > Versions: 3.0.2 > Environment: MySQL > Reporter: Markus Jessenitschnig > Priority: Minor > > > It is not possible to specify embed-xml="false" on key-many-to-one tags within composite-id tag like it is possible for many-to-one relations. -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |