|
View:
New views
13 Messages
—
Rating Filter:
Alert me
|
|
|
AndroMDA/JIRA Created: (HIB-165) 'patch' for multiple unique keys'patch' for multiple unique keys
-------------------------------- Key: HIB-165 URL: http://jira.andromda.org/browse/HIB-165 Project: Hibernate Cartridge Type: New Feature Versions: 3.1 Reporter: Darius Schier Assigned to: Carlos Cuenca I've added a 'patch' how to teach Hibernate multipele unique keys. Maybe you would like to integrate it into your cvs? It is based on 3.1 final. I've added a new tag called @andromda.persistence.column.uniqueGroup. This one will be mapped directly to hibernate's unique-key property. Attached you find the version for hibernate3, hib2 should be exactly the same. Regards Darius ********************* cartridges/andromda-hibernate/src/templates/hibernate3/hibernate.hbm.xml.vm for the ordinary column, i've added #if($attribute.columnUniqueGroup) unique-key="$attribute.columnUniqueGroup"#end ********************* metafacades/uml/common/src/java/org/andromda/metafacades/uml/UMLProfile.java metafacades/uml/common/src/META-INF/andromda/profile.xml added the new tag: /** * Represents a name that groups columns into one unique key. */ public static final String TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP = profile.get("PERSISTENCE_COLUMN_UNIQUE_GROUP"); <element name="PERSISTENCE_COLUMN_UNIQUE_GROUP"> <documentation></documentation> <value>@andromda.persistence.column.uniqueGroup</value> </element> ********************* Added the tag within andromda's metamodels (just do it with mc). It's a standard String tag (comparable to columnIndex): metafacades/uml/common/src/uml/UMLMetafacadeModel.xml.zip profiles/uml-1.4/persistence/src/main/uml/andromda-profile-persistence.xml.zip ********************* The handler is straight ahead: metafacades/uml/uml14/src/java/org/andromda/metafacades/uml14/EntityAttributeLogicImpl.java /** * @see org.andromda.metafacades.uml.EntityAttribute#getColumnUniqueGroup() */ protected java.lang.String handleGetColumnUniqueGroup() { final String group = (String)this.findTaggedValue(UMLProfile.TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP); return group != null ? StringUtils.trimToEmpty(group) : null; } ********************* I am not sure, if the following is ok: I thought the unique="true" has to be set to false if the attribute is part of a composite unique /** * @see org.andromda.metafacades.uml.EntityAttribute#isUnique() */ protected boolean handleIsUnique() { if( StringUtils.isBlank(this.handleGetColumnIndex())) { return this.hasStereotype(UMLProfile.STEREOTYPE_UNIQUE); } return false; } ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click |
|
|
AndroMDA/JIRA Commented: (HIB-165) 'patch' for multiple unique keys [ http://jira.andromda.org/browse/HIB-165?page=comments#action_12950 ]
Pierre Colot commented on HIB-165: ---------------------------------- I extended with support for unique key, composed key without reference key, composed key with referenced key It is based on 3.2 SNAPSHOT. Here is the diff unified (---new value +++old value) --- R:\PCOLOT\andromda-src-3.2-SNAPSHOT-20060514\metafacades\uml\common\src\java\org\andromda\metafacades\uml\UMLProfile.java Wed Jun 14 11:37:48 2006 +++ R:\PCOLOT\ref-andromda-src-3.2-SNAPSHOT-20060514\andromda-src-3.2-SNAPSHOT\metafacades\uml\common\src\java\org\andromda\metafacades\uml\UMLProfile.java Tue Apr 18 03:45:34 2006 @@ -175,11 +175,6 @@ public static final String TAGGEDVALUE_PERSISTENCE_COLUMN_LENGTH = profile.get("PERSISTENCE_COLUMN_LENGTH"); /** - * Represents a name that groups columns into one unique key. - */ - public static final String TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP = profile.get("PERSISTENCE_COLUMN_UNIQUE_GROUP"); - - /** * Represents a relational table column index name. */ public static final String TAGGEDVALUE_PERSISTENCE_COLUMN_INDEX = profile.get("PERSISTENCE_COLUMN_INDEX"); --- R:\PCOLOT\andromda-src-3.2-SNAPSHOT-20060514\metafacades\uml\common\src\META-INF\andromda\profile.xml Wed Jun 14 11:43:18 2006 +++ R:\PCOLOT\ref-andromda-src-3.2-SNAPSHOT-20060514\andromda-src-3.2-SNAPSHOT\metafacades\uml\common\src\META-INF\andromda\profile.xml Tue Apr 18 03:45:30 2006 @@ -195,10 +195,6 @@ <documentation></documentation> <value>@andromda.persistence.column.length</value> </element> - <element name="PERSISTENCE_COLUMN_UNIQUE_GROUP"> - <documentation></documentation> - <value>@andromda.persistence.column.uniqueGroup</value> - </element> <element name="PERSISTENCE_COLUMN_INDEX"> <documentation></documentation> <value>@andromda.persistence.column.index</value> --- R:\PCOLOT\andromda-src-3.2-SNAPSHOT-20060514\metafacades\uml\emf\uml2\src\main\java\org\andromda\metafacades\emf\uml2\EntityAssociationEndLogicImpl.java Tue Jun 27 10:28:40 2006 +++ R:\PCOLOT\ref-andromda-src-3.2-SNAPSHOT-20060514\andromda-src-3.2-SNAPSHOT\metafacades\uml\emf\uml2\src\main\java\org\andromda\metafacades\emf\uml2\EntityAssociationEndLogicImpl.java Mon May 01 21:02:24 2006 @@ -143,15 +143,6 @@ } /** - * @see org.andromda.metafacades.uml.EntityAssociationEnd#getColumnUniqueGroup() - */ - protected java.lang.String handleGetColumnUniqueGroup() - { - final String group = (String)this.findTaggedValue(UMLProfile.TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP); - return group != null ? StringUtils.trimToEmpty(group) : null; - } - - /** * @see org.andromda.metafacades.uml.EntityAssociationEnd#getSqlType() */ protected java.lang.String handleGetSqlType() --- R:\PCOLOT\andromda-src-3.2-SNAPSHOT-20060514\metafacades\uml\emf\uml2\src\main\java\org\andromda\metafacades\emf\uml2\EntityAttributeLogicImpl.java Tue Jun 27 10:29:30 2006 +++ R:\PCOLOT\ref-andromda-src-3.2-SNAPSHOT-20060514\andromda-src-3.2-SNAPSHOT\metafacades\uml\emf\uml2\src\main\java\org\andromda\metafacades\emf\uml2\EntityAttributeLogicImpl.java Tue Jun 27 10:29:30 2006 @@ -146,11 +146,8 @@ */ protected boolean handleIsUnique() { - if( StringUtils.isBlank(this.handleGetColumnIndex())) { return this.hasStereotype(UMLProfile.STEREOTYPE_UNIQUE); } - return false; - } /** * @see org.andromda.metafacades.uml.EntityAttribute#getColumnIndex() @@ -159,15 +156,6 @@ { final String index = (String)this.findTaggedValue(UMLProfile.TAGGEDVALUE_PERSISTENCE_COLUMN_INDEX); return index != null ? StringUtils.trimToEmpty(index) : null; - } - - /** - * @see org.andromda.metafacades.uml.EntityAttribute#getColumnUniqueGroup() - */ - protected java.lang.String handleGetColumnUniqueGroup() - { - final String group = (String)this.findTaggedValue(UMLProfile.TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP); - return group != null ? StringUtils.trimToEmpty(group) : null; } /** --- R:\PCOLOT\andromda-src-3.2-SNAPSHOT-20060514\metafacades\uml\uml14\src\java\org\andromda\metafacades\uml14\EntityAssociationEndLogicImpl.java Tue Jun 27 10:30:12 2006 +++ R:\PCOLOT\ref-andromda-src-3.2-SNAPSHOT-20060514\andromda-src-3.2-SNAPSHOT\metafacades\uml\uml14\src\java\org\andromda\metafacades\uml14\EntityAssociationEndLogicImpl.java Sun Mar 12 13:05:50 2006 @@ -135,15 +135,6 @@ } /** - * @see org.andromda.metafacades.uml14.EntityAssociationEndLogic#getColumnUniqueGroup() - */ - protected java.lang.String handleGetColumnUniqueGroup() - { - final String group = (String)this.findTaggedValue(UMLProfile.TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP); - return group != null ? StringUtils.trimToEmpty(group) : null; - } - - /** * @see org.andromda.metafacades.uml14.EntityAssociationEndLogic#handleGetSqlType() */ protected String handleGetSqlType() --- R:\PCOLOT\andromda-src-3.2-SNAPSHOT-20060514\metafacades\uml\uml14\src\java\org\andromda\metafacades\uml14\EntityAttributeLogicImpl.java Wed Jun 14 14:07:40 2006 +++ R:\PCOLOT\ref-andromda-src-3.2-SNAPSHOT-20060514\andromda-src-3.2-SNAPSHOT\metafacades\uml\uml14\src\java\org\andromda\metafacades\uml14\EntityAttributeLogicImpl.java Sun Mar 12 13:05:50 2006 @@ -58,15 +58,6 @@ } /** - * @see org.andromda.metafacades.uml.EntityAttribute#getColumnUniqueGroup() - */ - protected java.lang.String handleGetColumnUniqueGroup() - { - final String group = (String)this.findTaggedValue(UMLProfile.TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP); - return group != null ? StringUtils.trimToEmpty(group) : null; - } - - /** * @see org.andromda.metafacades.uml.EntityAttribute#isIdentifier() */ protected boolean handleIsIdentifier() @@ -79,10 +70,7 @@ */ protected boolean handleIsUnique() { - if( StringUtils.isBlank(this.handleGetColumnIndex())) { return this.hasStereotype(UMLProfile.STEREOTYPE_UNIQUE); - } - return false; } /** --- R:\PCOLOT\andromda-src-3.2-SNAPSHOT-20060514\metafacades\uml\uml2\src\main\java\org\andromda\metafacades\uml2\EntityAssociationEndLogicImpl.java Tue Jun 27 10:31:31 2006 +++ R:\PCOLOT\ref-andromda-src-3.2-SNAPSHOT-20060514\andromda-src-3.2-SNAPSHOT\metafacades\uml\uml2\src\main\java\org\andromda\metafacades\uml2\EntityAssociationEndLogicImpl.java Sun Mar 12 01:22:44 2006 @@ -61,15 +61,6 @@ } /** - * @see org.andromda.metafacades.uml.EntityAssociationEnd#getColumnUniqueGroup() - */ - protected java.lang.String handleGetColumnUniqueGroup() - { - // TODO: put your implementation here. - return null; - } - - /** * @see org.andromda.metafacades.uml.EntityAssociationEnd#getSqlType() */ protected java.lang.String handleGetSqlType() --- R:\PCOLOT\andromda-src-3.2-SNAPSHOT-20060514\metafacades\uml\uml2\src\main\java\org\andromda\metafacades\uml2\EntityAttributeLogicImpl.java Tue Jun 27 10:31:58 2006 +++ R:\PCOLOT\ref-andromda-src-3.2-SNAPSHOT-20060514\andromda-src-3.2-SNAPSHOT\metafacades\uml\uml2\src\main\java\org\andromda\metafacades\uml2\EntityAttributeLogicImpl.java Sun Mar 12 01:22:44 2006 @@ -96,15 +96,6 @@ return null; } - /** - * @see org.andromda.metafacades.uml.EntityAttribute#getColumnUniqueGroup() - */ - protected java.lang.String handleGetColumnUniqueGroup() - { - // TODO: put your implementation here. - return null; - } - protected boolean handleIsTransient() { // TODO: put your implementation here. Added the tag within andromda's metamodels (just do it with mc). It's a standard String tag (comparable to columnIndex): on Attribute and AssociationEnd metafacades/uml/common/src/uml/UMLMetafacadeModel.xml.zip profiles/uml-1.4/persistence/src/main/uml/andromda-profile-persistence.xml.zip regenerate cartridge src expected result or disble tests full rebuild (clean+install) profiles/uml-1.4/persistence and redeploy under MagicDraw/profile > 'patch' for multiple unique keys > -------------------------------- > > Key: HIB-165 > URL: http://jira.andromda.org/browse/HIB-165 > Project: Hibernate Cartridge > Type: New Feature > Versions: 3.1 > Reporter: Darius Schier > Assignee: Carlos Cuenca > > I've added a 'patch' how to teach Hibernate multipele unique keys. Maybe you would like to integrate it into your cvs? It is based on 3.1 final. > I've added a new tag called @andromda.persistence.column.uniqueGroup. This one will be mapped directly to hibernate's unique-key property. Attached you find the version for hibernate3, hib2 should be exactly the same. > Regards > Darius > ********************* > cartridges/andromda-hibernate/src/templates/hibernate3/hibernate.hbm.xml.vm > for the ordinary column, i've added > #if($attribute.columnUniqueGroup) unique-key="$attribute.columnUniqueGroup"#end > ********************* > metafacades/uml/common/src/java/org/andromda/metafacades/uml/UMLProfile.java > metafacades/uml/common/src/META-INF/andromda/profile.xml > added the new tag: > /** > * Represents a name that groups columns into one unique key. > */ > public static final String TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP = profile.get("PERSISTENCE_COLUMN_UNIQUE_GROUP"); > <element name="PERSISTENCE_COLUMN_UNIQUE_GROUP"> > <documentation></documentation> > <value>@andromda.persistence.column.uniqueGroup</value> > </element> > ********************* > Added the tag within andromda's metamodels (just do it with mc). It's a standard String tag (comparable to columnIndex): > metafacades/uml/common/src/uml/UMLMetafacadeModel.xml.zip > profiles/uml-1.4/persistence/src/main/uml/andromda-profile-persistence.xml.zip > ********************* > The handler is straight ahead: > metafacades/uml/uml14/src/java/org/andromda/metafacades/uml14/EntityAttributeLogicImpl.java > /** > * @see org.andromda.metafacades.uml.EntityAttribute#getColumnUniqueGroup() > */ > protected java.lang.String handleGetColumnUniqueGroup() > { > final String group = (String)this.findTaggedValue(UMLProfile.TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP); > return group != null ? StringUtils.trimToEmpty(group) : null; > } > ********************* > I am not sure, if the following is ok: I thought the unique="true" has to be set to false if the attribute is part of a composite unique > /** > * @see org.andromda.metafacades.uml.EntityAttribute#isUnique() > */ > protected boolean handleIsUnique() > { > if( StringUtils.isBlank(this.handleGetColumnIndex())) { > return this.hasStereotype(UMLProfile.STEREOTYPE_UNIQUE); > } > return false; > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.andromda.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 |
|
|
AndroMDA/JIRA Work started: (HIB-165) 'patch' for multiple unique keys [ http://jira.andromda.org/browse/HIB-165?page=all ]
Work on HIB-165 started by Carlos Cuenca > 'patch' for multiple unique keys > -------------------------------- > > Key: HIB-165 > URL: http://jira.andromda.org/browse/HIB-165 > Project: Hibernate Cartridge > Type: New Feature > Versions: 3.1 > Reporter: Darius Schier > Assignee: Carlos Cuenca > > I've added a 'patch' how to teach Hibernate multipele unique keys. Maybe you would like to integrate it into your cvs? It is based on 3.1 final. > I've added a new tag called @andromda.persistence.column.uniqueGroup. This one will be mapped directly to hibernate's unique-key property. Attached you find the version for hibernate3, hib2 should be exactly the same. > Regards > Darius > ********************* > cartridges/andromda-hibernate/src/templates/hibernate3/hibernate.hbm.xml.vm > for the ordinary column, i've added > #if($attribute.columnUniqueGroup) unique-key="$attribute.columnUniqueGroup"#end > ********************* > metafacades/uml/common/src/java/org/andromda/metafacades/uml/UMLProfile.java > metafacades/uml/common/src/META-INF/andromda/profile.xml > added the new tag: > /** > * Represents a name that groups columns into one unique key. > */ > public static final String TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP = profile.get("PERSISTENCE_COLUMN_UNIQUE_GROUP"); > <element name="PERSISTENCE_COLUMN_UNIQUE_GROUP"> > <documentation></documentation> > <value>@andromda.persistence.column.uniqueGroup</value> > </element> > ********************* > Added the tag within andromda's metamodels (just do it with mc). It's a standard String tag (comparable to columnIndex): > metafacades/uml/common/src/uml/UMLMetafacadeModel.xml.zip > profiles/uml-1.4/persistence/src/main/uml/andromda-profile-persistence.xml.zip > ********************* > The handler is straight ahead: > metafacades/uml/uml14/src/java/org/andromda/metafacades/uml14/EntityAttributeLogicImpl.java > /** > * @see org.andromda.metafacades.uml.EntityAttribute#getColumnUniqueGroup() > */ > protected java.lang.String handleGetColumnUniqueGroup() > { > final String group = (String)this.findTaggedValue(UMLProfile.TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP); > return group != null ? StringUtils.trimToEmpty(group) : null; > } > ********************* > I am not sure, if the following is ok: I thought the unique="true" has to be set to false if the attribute is part of a composite unique > /** > * @see org.andromda.metafacades.uml.EntityAttribute#isUnique() > */ > protected boolean handleIsUnique() > { > if( StringUtils.isBlank(this.handleGetColumnIndex())) { > return this.hasStereotype(UMLProfile.STEREOTYPE_UNIQUE); > } > return false; > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.andromda.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 |
|
|
AndroMDA/JIRA Commented: (HIB-165) 'patch' for multiple unique keys [ http://jira.andromda.org/browse/HIB-165?page=comments#action_13292 ]
Carlos Cuenca commented on HIB-165: ----------------------------------- I had commited a patch for enable unique constrains involving multiple attributes. To create one, just set the @andromda.persistence.column.uniqueGroup tagged value on each attribute, with the same unique name. Based on Darius Schier patch. > 'patch' for multiple unique keys > -------------------------------- > > Key: HIB-165 > URL: http://jira.andromda.org/browse/HIB-165 > Project: Hibernate Cartridge > Type: New Feature > Versions: 3.1 > Reporter: Darius Schier > Assignee: Carlos Cuenca > > I've added a 'patch' how to teach Hibernate multipele unique keys. Maybe you would like to integrate it into your cvs? It is based on 3.1 final. > I've added a new tag called @andromda.persistence.column.uniqueGroup. This one will be mapped directly to hibernate's unique-key property. Attached you find the version for hibernate3, hib2 should be exactly the same. > Regards > Darius > ********************* > cartridges/andromda-hibernate/src/templates/hibernate3/hibernate.hbm.xml.vm > for the ordinary column, i've added > #if($attribute.columnUniqueGroup) unique-key="$attribute.columnUniqueGroup"#end > ********************* > metafacades/uml/common/src/java/org/andromda/metafacades/uml/UMLProfile.java > metafacades/uml/common/src/META-INF/andromda/profile.xml > added the new tag: > /** > * Represents a name that groups columns into one unique key. > */ > public static final String TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP = profile.get("PERSISTENCE_COLUMN_UNIQUE_GROUP"); > <element name="PERSISTENCE_COLUMN_UNIQUE_GROUP"> > <documentation></documentation> > <value>@andromda.persistence.column.uniqueGroup</value> > </element> > ********************* > Added the tag within andromda's metamodels (just do it with mc). It's a standard String tag (comparable to columnIndex): > metafacades/uml/common/src/uml/UMLMetafacadeModel.xml.zip > profiles/uml-1.4/persistence/src/main/uml/andromda-profile-persistence.xml.zip > ********************* > The handler is straight ahead: > metafacades/uml/uml14/src/java/org/andromda/metafacades/uml14/EntityAttributeLogicImpl.java > /** > * @see org.andromda.metafacades.uml.EntityAttribute#getColumnUniqueGroup() > */ > protected java.lang.String handleGetColumnUniqueGroup() > { > final String group = (String)this.findTaggedValue(UMLProfile.TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP); > return group != null ? StringUtils.trimToEmpty(group) : null; > } > ********************* > I am not sure, if the following is ok: I thought the unique="true" has to be set to false if the attribute is part of a composite unique > /** > * @see org.andromda.metafacades.uml.EntityAttribute#isUnique() > */ > protected boolean handleIsUnique() > { > if( StringUtils.isBlank(this.handleGetColumnIndex())) { > return this.hasStereotype(UMLProfile.STEREOTYPE_UNIQUE); > } > return false; > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.andromda.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 |
|
|
AndroMDA/JIRA Closed: (HIB-165) 'patch' for multiple unique keys [ http://jira.andromda.org/browse/HIB-165?page=all ]
Carlos Cuenca closed HIB-165: ----------------------------- Fix Version: 3.2-RC1 Resolution: Fixed > 'patch' for multiple unique keys > -------------------------------- > > Key: HIB-165 > URL: http://jira.andromda.org/browse/HIB-165 > Project: Hibernate Cartridge > Type: New Feature > Versions: 3.1 > Reporter: Darius Schier > Assignee: Carlos Cuenca > Fix For: 3.2-RC1 > > I've added a 'patch' how to teach Hibernate multipele unique keys. Maybe you would like to integrate it into your cvs? It is based on 3.1 final. > I've added a new tag called @andromda.persistence.column.uniqueGroup. This one will be mapped directly to hibernate's unique-key property. Attached you find the version for hibernate3, hib2 should be exactly the same. > Regards > Darius > ********************* > cartridges/andromda-hibernate/src/templates/hibernate3/hibernate.hbm.xml.vm > for the ordinary column, i've added > #if($attribute.columnUniqueGroup) unique-key="$attribute.columnUniqueGroup"#end > ********************* > metafacades/uml/common/src/java/org/andromda/metafacades/uml/UMLProfile.java > metafacades/uml/common/src/META-INF/andromda/profile.xml > added the new tag: > /** > * Represents a name that groups columns into one unique key. > */ > public static final String TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP = profile.get("PERSISTENCE_COLUMN_UNIQUE_GROUP"); > <element name="PERSISTENCE_COLUMN_UNIQUE_GROUP"> > <documentation></documentation> > <value>@andromda.persistence.column.uniqueGroup</value> > </element> > ********************* > Added the tag within andromda's metamodels (just do it with mc). It's a standard String tag (comparable to columnIndex): > metafacades/uml/common/src/uml/UMLMetafacadeModel.xml.zip > profiles/uml-1.4/persistence/src/main/uml/andromda-profile-persistence.xml.zip > ********************* > The handler is straight ahead: > metafacades/uml/uml14/src/java/org/andromda/metafacades/uml14/EntityAttributeLogicImpl.java > /** > * @see org.andromda.metafacades.uml.EntityAttribute#getColumnUniqueGroup() > */ > protected java.lang.String handleGetColumnUniqueGroup() > { > final String group = (String)this.findTaggedValue(UMLProfile.TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP); > return group != null ? StringUtils.trimToEmpty(group) : null; > } > ********************* > I am not sure, if the following is ok: I thought the unique="true" has to be set to false if the attribute is part of a composite unique > /** > * @see org.andromda.metafacades.uml.EntityAttribute#isUnique() > */ > protected boolean handleIsUnique() > { > if( StringUtils.isBlank(this.handleGetColumnIndex())) { > return this.hasStereotype(UMLProfile.STEREOTYPE_UNIQUE); > } > return false; > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.andromda.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 |
|
|
AndroMDA/JIRA Commented: (HIB-165) 'patch' for multiple unique keys [ http://jira.andromda.org/browse/HIB-165?page=comments#action_13532 ]
Pierre Colot commented on HIB-165: ---------------------------------- Unique key based on end of Association are not covered by the patch. The same resolution should be applyed on EntityAssociationEnd in the metaface and hibernate3 templates > 'patch' for multiple unique keys > -------------------------------- > > Key: HIB-165 > URL: http://jira.andromda.org/browse/HIB-165 > Project: Hibernate Cartridge > Type: New Feature > Versions: 3.1 > Reporter: Darius Schier > Assignee: Carlos Cuenca > Fix For: 3.2-RC1 > > I've added a 'patch' how to teach Hibernate multipele unique keys. Maybe you would like to integrate it into your cvs? It is based on 3.1 final. > I've added a new tag called @andromda.persistence.column.uniqueGroup. This one will be mapped directly to hibernate's unique-key property. Attached you find the version for hibernate3, hib2 should be exactly the same. > Regards > Darius > ********************* > cartridges/andromda-hibernate/src/templates/hibernate3/hibernate.hbm.xml.vm > for the ordinary column, i've added > #if($attribute.columnUniqueGroup) unique-key="$attribute.columnUniqueGroup"#end > ********************* > metafacades/uml/common/src/java/org/andromda/metafacades/uml/UMLProfile.java > metafacades/uml/common/src/META-INF/andromda/profile.xml > added the new tag: > /** > * Represents a name that groups columns into one unique key. > */ > public static final String TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP = profile.get("PERSISTENCE_COLUMN_UNIQUE_GROUP"); > <element name="PERSISTENCE_COLUMN_UNIQUE_GROUP"> > <documentation></documentation> > <value>@andromda.persistence.column.uniqueGroup</value> > </element> > ********************* > Added the tag within andromda's metamodels (just do it with mc). It's a standard String tag (comparable to columnIndex): > metafacades/uml/common/src/uml/UMLMetafacadeModel.xml.zip > profiles/uml-1.4/persistence/src/main/uml/andromda-profile-persistence.xml.zip > ********************* > The handler is straight ahead: > metafacades/uml/uml14/src/java/org/andromda/metafacades/uml14/EntityAttributeLogicImpl.java > /** > * @see org.andromda.metafacades.uml.EntityAttribute#getColumnUniqueGroup() > */ > protected java.lang.String handleGetColumnUniqueGroup() > { > final String group = (String)this.findTaggedValue(UMLProfile.TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP); > return group != null ? StringUtils.trimToEmpty(group) : null; > } > ********************* > I am not sure, if the following is ok: I thought the unique="true" has to be set to false if the attribute is part of a composite unique > /** > * @see org.andromda.metafacades.uml.EntityAttribute#isUnique() > */ > protected boolean handleIsUnique() > { > if( StringUtils.isBlank(this.handleGetColumnIndex())) { > return this.hasStereotype(UMLProfile.STEREOTYPE_UNIQUE); > } > return false; > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.andromda.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV |
|
|
AndroMDA/JIRA Commented: (HIB-165) 'patch' for multiple unique keys [ http://jira.andromda.org/browse/HIB-165?page=comments#action_13990 ]
Jean-François St-Germain commented on HIB-165: ---------------------------------------------- @andromda.persistence.column.uniqueGroup tag is ignored when two entities are associated by aggregation. > 'patch' for multiple unique keys > -------------------------------- > > Key: HIB-165 > URL: http://jira.andromda.org/browse/HIB-165 > Project: Hibernate Cartridge > Type: New Feature > Versions: 3.1 > Reporter: Darius Schier > Assignee: Carlos Cuenca > Fix For: 3.2-RC1 > > I've added a 'patch' how to teach Hibernate multipele unique keys. Maybe you would like to integrate it into your cvs? It is based on 3.1 final. > I've added a new tag called @andromda.persistence.column.uniqueGroup. This one will be mapped directly to hibernate's unique-key property. Attached you find the version for hibernate3, hib2 should be exactly the same. > Regards > Darius > ********************* > cartridges/andromda-hibernate/src/templates/hibernate3/hibernate.hbm.xml.vm > for the ordinary column, i've added > #if($attribute.columnUniqueGroup) unique-key="$attribute.columnUniqueGroup"#end > ********************* > metafacades/uml/common/src/java/org/andromda/metafacades/uml/UMLProfile.java > metafacades/uml/common/src/META-INF/andromda/profile.xml > added the new tag: > /** > * Represents a name that groups columns into one unique key. > */ > public static final String TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP = profile.get("PERSISTENCE_COLUMN_UNIQUE_GROUP"); > <element name="PERSISTENCE_COLUMN_UNIQUE_GROUP"> > <documentation></documentation> > <value>@andromda.persistence.column.uniqueGroup</value> > </element> > ********************* > Added the tag within andromda's metamodels (just do it with mc). It's a standard String tag (comparable to columnIndex): > metafacades/uml/common/src/uml/UMLMetafacadeModel.xml.zip > profiles/uml-1.4/persistence/src/main/uml/andromda-profile-persistence.xml.zip > ********************* > The handler is straight ahead: > metafacades/uml/uml14/src/java/org/andromda/metafacades/uml14/EntityAttributeLogicImpl.java > /** > * @see org.andromda.metafacades.uml.EntityAttribute#getColumnUniqueGroup() > */ > protected java.lang.String handleGetColumnUniqueGroup() > { > final String group = (String)this.findTaggedValue(UMLProfile.TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP); > return group != null ? StringUtils.trimToEmpty(group) : null; > } > ********************* > I am not sure, if the following is ok: I thought the unique="true" has to be set to false if the attribute is part of a composite unique > /** > * @see org.andromda.metafacades.uml.EntityAttribute#isUnique() > */ > protected boolean handleIsUnique() > { > if( StringUtils.isBlank(this.handleGetColumnIndex())) { > return this.hasStereotype(UMLProfile.STEREOTYPE_UNIQUE); > } > return false; > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.andromda.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV |
|
|
AndroMDA/JIRA Commented: (HIB-165) 'patch' for multiple unique keys [ http://jira.andromda.org/browse/HIB-165?page=comments#action_14090 ]
Jean-François St-Germain commented on HIB-165: ---------------------------------------------- Please re-open this issue to be included in the next release with Pierre's patch for support of uniqueGroup tagged value on associations. > 'patch' for multiple unique keys > -------------------------------- > > Key: HIB-165 > URL: http://jira.andromda.org/browse/HIB-165 > Project: Hibernate Cartridge > Type: New Feature > Versions: 3.1 > Reporter: Darius Schier > Assignee: Carlos Cuenca > Fix For: 3.2-RC1 > > I've added a 'patch' how to teach Hibernate multipele unique keys. Maybe you would like to integrate it into your cvs? It is based on 3.1 final. > I've added a new tag called @andromda.persistence.column.uniqueGroup. This one will be mapped directly to hibernate's unique-key property. Attached you find the version for hibernate3, hib2 should be exactly the same. > Regards > Darius > ********************* > cartridges/andromda-hibernate/src/templates/hibernate3/hibernate.hbm.xml.vm > for the ordinary column, i've added > #if($attribute.columnUniqueGroup) unique-key="$attribute.columnUniqueGroup"#end > ********************* > metafacades/uml/common/src/java/org/andromda/metafacades/uml/UMLProfile.java > metafacades/uml/common/src/META-INF/andromda/profile.xml > added the new tag: > /** > * Represents a name that groups columns into one unique key. > */ > public static final String TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP = profile.get("PERSISTENCE_COLUMN_UNIQUE_GROUP"); > <element name="PERSISTENCE_COLUMN_UNIQUE_GROUP"> > <documentation></documentation> > <value>@andromda.persistence.column.uniqueGroup</value> > </element> > ********************* > Added the tag within andromda's metamodels (just do it with mc). It's a standard String tag (comparable to columnIndex): > metafacades/uml/common/src/uml/UMLMetafacadeModel.xml.zip > profiles/uml-1.4/persistence/src/main/uml/andromda-profile-persistence.xml.zip > ********************* > The handler is straight ahead: > metafacades/uml/uml14/src/java/org/andromda/metafacades/uml14/EntityAttributeLogicImpl.java > /** > * @see org.andromda.metafacades.uml.EntityAttribute#getColumnUniqueGroup() > */ > protected java.lang.String handleGetColumnUniqueGroup() > { > final String group = (String)this.findTaggedValue(UMLProfile.TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP); > return group != null ? StringUtils.trimToEmpty(group) : null; > } > ********************* > I am not sure, if the following is ok: I thought the unique="true" has to be set to false if the attribute is part of a composite unique > /** > * @see org.andromda.metafacades.uml.EntityAttribute#isUnique() > */ > protected boolean handleIsUnique() > { > if( StringUtils.isBlank(this.handleGetColumnIndex())) { > return this.hasStereotype(UMLProfile.STEREOTYPE_UNIQUE); > } > return false; > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.andromda.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV |
|
|
AndroMDA/JIRA Reopened: (HIB-165) 'patch' for multiple unique keys [ http://jira.andromda.org/browse/HIB-165?page=all ]
Carlos Cuenca reopened HIB-165: ------------------------------- > 'patch' for multiple unique keys > -------------------------------- > > Key: HIB-165 > URL: http://jira.andromda.org/browse/HIB-165 > Project: Hibernate Cartridge > Type: New Feature > Versions: 3.1 > Reporter: Darius Schier > Assignee: Carlos Cuenca > Fix For: 3.2-RC1 > > I've added a 'patch' how to teach Hibernate multipele unique keys. Maybe you would like to integrate it into your cvs? It is based on 3.1 final. > I've added a new tag called @andromda.persistence.column.uniqueGroup. This one will be mapped directly to hibernate's unique-key property. Attached you find the version for hibernate3, hib2 should be exactly the same. > Regards > Darius > ********************* > cartridges/andromda-hibernate/src/templates/hibernate3/hibernate.hbm.xml.vm > for the ordinary column, i've added > #if($attribute.columnUniqueGroup) unique-key="$attribute.columnUniqueGroup"#end > ********************* > metafacades/uml/common/src/java/org/andromda/metafacades/uml/UMLProfile.java > metafacades/uml/common/src/META-INF/andromda/profile.xml > added the new tag: > /** > * Represents a name that groups columns into one unique key. > */ > public static final String TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP = profile.get("PERSISTENCE_COLUMN_UNIQUE_GROUP"); > <element name="PERSISTENCE_COLUMN_UNIQUE_GROUP"> > <documentation></documentation> > <value>@andromda.persistence.column.uniqueGroup</value> > </element> > ********************* > Added the tag within andromda's metamodels (just do it with mc). It's a standard String tag (comparable to columnIndex): > metafacades/uml/common/src/uml/UMLMetafacadeModel.xml.zip > profiles/uml-1.4/persistence/src/main/uml/andromda-profile-persistence.xml.zip > ********************* > The handler is straight ahead: > metafacades/uml/uml14/src/java/org/andromda/metafacades/uml14/EntityAttributeLogicImpl.java > /** > * @see org.andromda.metafacades.uml.EntityAttribute#getColumnUniqueGroup() > */ > protected java.lang.String handleGetColumnUniqueGroup() > { > final String group = (String)this.findTaggedValue(UMLProfile.TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP); > return group != null ? StringUtils.trimToEmpty(group) : null; > } > ********************* > I am not sure, if the following is ok: I thought the unique="true" has to be set to false if the attribute is part of a composite unique > /** > * @see org.andromda.metafacades.uml.EntityAttribute#isUnique() > */ > protected boolean handleIsUnique() > { > if( StringUtils.isBlank(this.handleGetColumnIndex())) { > return this.hasStereotype(UMLProfile.STEREOTYPE_UNIQUE); > } > return false; > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.andromda.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV |
|
|
AndroMDA/JIRA Commented: (HIB-165) 'patch' for multiple unique keys [ http://jira.andromda.org/browse/HIB-165?page=comments#action_15340 ]
Olivier THIERRY commented on HIB-165: ------------------------------------- Hi, I use AndroMDA 3.3 SNAPSHOT and I can't find any trace of columnUniqueGroup in metafacades. Does it mean this patch has been applied to 3.2 but not to 3.3 ? > 'patch' for multiple unique keys > -------------------------------- > > Key: HIB-165 > URL: http://jira.andromda.org/browse/HIB-165 > Project: Hibernate Cartridge > Type: New Feature > Versions: 3.1 > Reporter: Darius Schier > Assignee: Carlos Cuenca > Fix For: 3.2-RC1 > > I've added a 'patch' how to teach Hibernate multipele unique keys. Maybe you would like to integrate it into your cvs? It is based on 3.1 final. > I've added a new tag called @andromda.persistence.column.uniqueGroup. This one will be mapped directly to hibernate's unique-key property. Attached you find the version for hibernate3, hib2 should be exactly the same. > Regards > Darius > ********************* > cartridges/andromda-hibernate/src/templates/hibernate3/hibernate.hbm.xml.vm > for the ordinary column, i've added > #if($attribute.columnUniqueGroup) unique-key="$attribute.columnUniqueGroup"#end > ********************* > metafacades/uml/common/src/java/org/andromda/metafacades/uml/UMLProfile.java > metafacades/uml/common/src/META-INF/andromda/profile.xml > added the new tag: > /** > * Represents a name that groups columns into one unique key. > */ > public static final String TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP = profile.get("PERSISTENCE_COLUMN_UNIQUE_GROUP"); > <element name="PERSISTENCE_COLUMN_UNIQUE_GROUP"> > <documentation></documentation> > <value>@andromda.persistence.column.uniqueGroup</value> > </element> > ********************* > Added the tag within andromda's metamodels (just do it with mc). It's a standard String tag (comparable to columnIndex): > metafacades/uml/common/src/uml/UMLMetafacadeModel.xml.zip > profiles/uml-1.4/persistence/src/main/uml/andromda-profile-persistence.xml.zip > ********************* > The handler is straight ahead: > metafacades/uml/uml14/src/java/org/andromda/metafacades/uml14/EntityAttributeLogicImpl.java > /** > * @see org.andromda.metafacades.uml.EntityAttribute#getColumnUniqueGroup() > */ > protected java.lang.String handleGetColumnUniqueGroup() > { > final String group = (String)this.findTaggedValue(UMLProfile.TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP); > return group != null ? StringUtils.trimToEmpty(group) : null; > } > ********************* > I am not sure, if the following is ok: I thought the unique="true" has to be set to false if the attribute is part of a composite unique > /** > * @see org.andromda.metafacades.uml.EntityAttribute#isUnique() > */ > protected boolean handleIsUnique() > { > if( StringUtils.isBlank(this.handleGetColumnIndex())) { > return this.hasStereotype(UMLProfile.STEREOTYPE_UNIQUE); > } > return false; > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.andromda.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone |
|
|
AndroMDA/JIRA Updated: (HIB-165) 'patch' for multiple unique keys [ http://jira.andromda.org/browse/HIB-165?page=all ]
Olivier THIERRY updated HIB-165: -------------------------------- Attachment: andromda-metafacades-uml.xml.zip emf.uml2.EntityAssociationEndLogicImpl.diff emf.uml2.EntityAttributeLogicImpl.diff > 'patch' for multiple unique keys > -------------------------------- > > Key: HIB-165 > URL: http://jira.andromda.org/browse/HIB-165 > Project: Hibernate Cartridge > Type: New Feature > Versions: 3.1 > Reporter: Darius Schier > Assignee: Carlos Cuenca > Fix For: 3.2-RC1 > Attachments: andromda-metafacades-uml.xml.zip, emf.uml2.EntityAssociationEndLogicImpl.diff, emf.uml2.EntityAttributeLogicImpl.diff > > I've added a 'patch' how to teach Hibernate multipele unique keys. Maybe you would like to integrate it into your cvs? It is based on 3.1 final. > I've added a new tag called @andromda.persistence.column.uniqueGroup. This one will be mapped directly to hibernate's unique-key property. Attached you find the version for hibernate3, hib2 should be exactly the same. > Regards > Darius > ********************* > cartridges/andromda-hibernate/src/templates/hibernate3/hibernate.hbm.xml.vm > for the ordinary column, i've added > #if($attribute.columnUniqueGroup) unique-key="$attribute.columnUniqueGroup"#end > ********************* > metafacades/uml/common/src/java/org/andromda/metafacades/uml/UMLProfile.java > metafacades/uml/common/src/META-INF/andromda/profile.xml > added the new tag: > /** > * Represents a name that groups columns into one unique key. > */ > public static final String TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP = profile.get("PERSISTENCE_COLUMN_UNIQUE_GROUP"); > <element name="PERSISTENCE_COLUMN_UNIQUE_GROUP"> > <documentation></documentation> > |