From: James O. (JIRA) <no...@at...> - 2006-03-22 04:18:01
|
Allow ability to ignore Foreign Keys ------------------------------------ Key: HBX-622 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-622 Project: Hibernate Tools Type: New Feature Components: reverse-engineer Versions: 3.1beta4 Environment: As per patch. Reporter: James Olsen Attachments: svn-patch.txt On the project I'm currently working on we want 1:1 POJO<->Table mapping without any relationships between the POJOs. Although this is not a configuration that I would normally choose or recommend, in this case it is forced upon us be external architectural requirements. Currently in order to avoid relationships in your POJOs you have to reveng each table individually. The attached patch is a proposed solution to allow the reveng to ignore relationships between tables when reverse engineering multiple tables at the same time. Note that the patch only supports this for ReverseEngineeringStrategy not for reveng.xml. I'm supplying the patch in the hope that it (or something similar) can be incorporated into the main code and in case anyone else has (unfortunately) similar requirements. -- 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: Max R. A. (JIRA) <no...@at...> - 2006-03-24 18:56:19
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-622?page=comments#action_22569 ] Max Rydahl Andersen commented on HBX-622: ----------------------------------------- and return Collections.EMPTY_LIST does not work for you ? > Allow ability to ignore Foreign Keys > ------------------------------------ > > Key: HBX-622 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-622 > Project: Hibernate Tools > Type: New Feature > Components: reverse-engineer > Versions: 3.1beta4 > Environment: As per patch. > Reporter: James Olsen > Attachments: svn-patch.txt > > > On the project I'm currently working on we want 1:1 POJO<->Table mapping without any relationships between the POJOs. Although this is not a configuration that I would normally choose or recommend, in this case it is forced upon us be external architectural requirements. > Currently in order to avoid relationships in your POJOs you have to reveng each table individually. The attached patch is a proposed solution to allow the reveng to ignore relationships between tables when reverse engineering multiple tables at the same time. > Note that the patch only supports this for ReverseEngineeringStrategy not for reveng.xml. > I'm supplying the patch in the hope that it (or something similar) can be incorporated into the main code and in case anyone else has (unfortunately) similar requirements. -- 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: George L. (JIRA) <no...@at...> - 2006-03-24 18:56:29
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-622?page=comments#action_22583 ] George Lindholm commented on HBX-622: ------------------------------------- I also need something like this, except that I need to be able to exclude specific columns in one table that refer to a second table. Eg: I have <hibernate-mapping> <class name="ca.ubc.nmc.contacts.db.NcContact" table="NC_CONTACT"> <id name="contactId" type="long"> <column name="CONTACT_ID" precision="10" scale="0" /> <generator class="ca.ubc.nmc.contacts.ContactIdGenerator"></generator> </id> <timestamp name="lastUpdtDate" column="LAST_UPDT_DATE" /> <many-to-one name="role" class="ca.ubc.nmc.contacts.db.NcRoleTypeTbl" fetch="select"> <column name="ROLE" length="4" /> </many-to-one> <many-to-one name="orgUnitIdAndorgUnitType" class="ca.ubc.nmc.contacts.db.NcOrgUnit" fetch="select"> <column name="ORG_UNIT_ID" length="10" /> <column name="ORG_UNIT_TYPE" length="4" /> </many-to-one> and I want to programatically have ORG_UNIT_ID and ORG_UNIT_TYPE mapped to normal String values, instead of keys to another table. > Allow ability to ignore Foreign Keys > ------------------------------------ > > Key: HBX-622 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-622 > Project: Hibernate Tools > Type: New Feature > Components: reverse-engineer > Versions: 3.1beta4 > Environment: As per patch. > Reporter: James Olsen > Attachments: svn-patch.txt > > > On the project I'm currently working on we want 1:1 POJO<->Table mapping without any relationships between the POJOs. Although this is not a configuration that I would normally choose or recommend, in this case it is forced upon us be external architectural requirements. > Currently in order to avoid relationships in your POJOs you have to reveng each table individually. The attached patch is a proposed solution to allow the reveng to ignore relationships between tables when reverse engineering multiple tables at the same time. > Note that the patch only supports this for ReverseEngineeringStrategy not for reveng.xml. > I'm supplying the patch in the hope that it (or something similar) can be incorporated into the main code and in case anyone else has (unfortunately) similar requirements. -- 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: Michael S. (JIRA) <no...@at...> - 2006-07-12 21:04:15
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-622?page=comments#action_23612 ] Michael Slattery commented on HBX-622: -------------------------------------- We wrote a workaround for this as we didn't want to modify the hibernate source. We implemented a simple JDBC wrapper driver that disables foreign key metadata. > Allow ability to ignore Foreign Keys > ------------------------------------ > > Key: HBX-622 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-622 > Project: Hibernate Tools > Type: New Feature > Components: reverse-engineer > Versions: 3.1beta4 > Environment: As per patch. > Reporter: James Olsen > Attachments: svn-patch.txt > > > On the project I'm currently working on we want 1:1 POJO<->Table mapping without any relationships between the POJOs. Although this is not a configuration that I would normally choose or recommend, in this case it is forced upon us be external architectural requirements. > Currently in order to avoid relationships in your POJOs you have to reveng each table individually. The attached patch is a proposed solution to allow the reveng to ignore relationships between tables when reverse engineering multiple tables at the same time. > Note that the patch only supports this for ReverseEngineeringStrategy not for reveng.xml. > I'm supplying the patch in the hope that it (or something similar) can be incorporated into the main code and in case anyone else has (unfortunately) similar requirements. -- 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: Michael S. (JIRA) <no...@at...> - 2006-07-12 22:19:58
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-622?page=comments#action_23613 ] Michael Slattery commented on HBX-622: -------------------------------------- I found a much better solution. Set the property: "hibernatetool.metadatadialect" to the class name of: public class KeylessMetaDataDialect extends JDBCMetaDataDialect { @Override public Iterator getExportedKeys(String catalog, String schema, String table) { return Collections.EMPTY_LIST.iterator(); } } (I realize that extending a wrapper of MetaDataDialect would be better design) > Allow ability to ignore Foreign Keys > ------------------------------------ > > Key: HBX-622 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-622 > Project: Hibernate Tools > Type: New Feature > Components: reverse-engineer > Versions: 3.1beta4 > Environment: As per patch. > Reporter: James Olsen > Attachments: svn-patch.txt > > > On the project I'm currently working on we want 1:1 POJO<->Table mapping without any relationships between the POJOs. Although this is not a configuration that I would normally choose or recommend, in this case it is forced upon us be external architectural requirements. > Currently in order to avoid relationships in your POJOs you have to reveng each table individually. The attached patch is a proposed solution to allow the reveng to ignore relationships between tables when reverse engineering multiple tables at the same time. > Note that the patch only supports this for ReverseEngineeringStrategy not for reveng.xml. > I'm supplying the patch in the hope that it (or something similar) can be incorporated into the main code and in case anyone else has (unfortunately) similar requirements. -- 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: Max R. A. (JIRA) <no...@at...> - 2006-07-13 05:42:58
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-622?page=comments#action_23614 ] Max Rydahl Andersen commented on HBX-622: ----------------------------------------- that is completely what it was intended for. > Allow ability to ignore Foreign Keys > ------------------------------------ > > Key: HBX-622 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-622 > Project: Hibernate Tools > Type: New Feature > Components: reverse-engineer > Versions: 3.1beta4 > Environment: As per patch. > Reporter: James Olsen > Attachments: svn-patch.txt > > > On the project I'm currently working on we want 1:1 POJO<->Table mapping without any relationships between the POJOs. Although this is not a configuration that I would normally choose or recommend, in this case it is forced upon us be external architectural requirements. > Currently in order to avoid relationships in your POJOs you have to reveng each table individually. The attached patch is a proposed solution to allow the reveng to ignore relationships between tables when reverse engineering multiple tables at the same time. > Note that the patch only supports this for ReverseEngineeringStrategy not for reveng.xml. > I'm supplying the patch in the hope that it (or something similar) can be incorporated into the main code and in case anyone else has (unfortunately) similar requirements. -- 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 |