[hibernate-issues] [Hibernate-JIRA] Updated: (METAGEN-57) Attributes are not generated for EmbeddedId and collections when the mapping is defined in orm.xml mapping files
Hardy Ferentschik (JIRA)
noreply at atlassian.com
Thu Jul 7 10:36:53 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/METAGEN-57?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hardy Ferentschik updated METAGEN-57:
-------------------------------------
Description:
To fix the collection problem l. 196 of _XmlMetaEntity_ (in the getCollectionTypes method):
{code}
if ( expectedElementKind.equals( elem.getKind() ) ) {
{code}
should be replaced by
{code}
if ( ! expectedElementKind.equals( elem.getKind() ) ) {
{code}
To fix the _EmbeddedId_ problem the following code should be inserted at l. 332 of _XmlMetaEntity_ (in the parseAttributes method):
{code}
if ( attributes.getEmbeddedId() != null) {
EmbeddedId embeddedId = attributes.getEmbeddedId();
ElementKind elementKind = getElementKind( embeddedId.getAccess() );
String type = getType( embeddedId.getName(), null, elementKind );
if ( type != null ) {
attribute = new XmlMetaSingleAttribute( this, embeddedId.getName(), type );
members.add( attribute );
}
}
{code}
was:
To fix the collection problem l. 196 of XmlMetaEntity (in the getCollectionTypes method):
if ( expectedElementKind.equals( elem.getKind() ) ) {
should be replaced by
if ( ! expectedElementKind.equals( elem.getKind() ) ) {
To fix the EmbeddedId problem the following code should be inserted at l. 332 of XmlMetaEntity (in the parseAttributes method):
if ( attributes.getEmbeddedId() != null) {
EmbeddedId embeddedId = attributes.getEmbeddedId();
ElementKind elementKind = getElementKind( embeddedId.getAccess() );
String type = getType( embeddedId.getName(), null, elementKind );
if ( type != null ) {
attribute = new XmlMetaSingleAttribute( this, embeddedId.getName(), type );
members.add( attribute );
}
}
> Attributes are not generated for EmbeddedId and collections when the mapping is defined in orm.xml mapping files
> ----------------------------------------------------------------------------------------------------------------
>
> Key: METAGEN-57
> URL: http://opensource.atlassian.com/projects/hibernate/browse/METAGEN-57
> Project: Hibernate Metamodel Generator
> Issue Type: Bug
> Affects Versions: 1.1.0.Final
> Reporter: Rolf Thunbo
> Assignee: Hardy Ferentschik
> Fix For: 1.1.2.Final
>
>
> To fix the collection problem l. 196 of _XmlMetaEntity_ (in the getCollectionTypes method):
> {code}
> if ( expectedElementKind.equals( elem.getKind() ) ) {
> {code}
> should be replaced by
> {code}
> if ( ! expectedElementKind.equals( elem.getKind() ) ) {
> {code}
> To fix the _EmbeddedId_ problem the following code should be inserted at l. 332 of _XmlMetaEntity_ (in the parseAttributes method):
> {code}
> if ( attributes.getEmbeddedId() != null) {
> EmbeddedId embeddedId = attributes.getEmbeddedId();
> ElementKind elementKind = getElementKind( embeddedId.getAccess() );
> String type = getType( embeddedId.getName(), null, elementKind );
> if ( type != null ) {
> attribute = new XmlMetaSingleAttribute( this, embeddedId.getName(), type );
> members.add( attribute );
> }
> }
> {code}
--
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
More information about the hibernate-issues
mailing list