[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1987) Custom Fields Support for Hibernate
Max Rydahl Andersen (JIRA)
noreply at atlassian.com
Mon Aug 14 04:20:19 EDT 2006
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1987?page=comments#action_23918 ]
Max Rydahl Andersen commented on HHH-1987:
------------------------------------------
i did not suggest to put things in a map I just stated you did not need to extend any of Hibernate internal classes to do this.
You are basically just adjusting the Configuration object with additonal Property elements; completely doable without subclassing Configuration.
Thus I'll also close this bug since you haven't showed me something that cannot be done with the current setup (your code of course automates some of it, but it is trivial code and will probably be application dependent anyway)
> Custom Fields Support for Hibernate
> -----------------------------------
>
> Key: HHH-1987
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1987
> Project: Hibernate3
> Type: New Feature
> Reporter: Ali El Gamal
> Priority: Minor
> Attachments: CustomFields.zip
>
>
> What is it?
> =======
> Custom Fields Support means the ability to add custom fields to existing hibernate entities in runtime without modifying .hbm files or even recompilling the classes.
> Problem Example:
> =============
> Assume an enterprise application that contains information about a company's customers. When the enterprise application was developed, the communication between the company and its customers was through phone calls. As the company become larger and is now making business overseas, they now have customers outside their country and some business is now done through emails. Unfortunately, the old enterprise application that the company was using doesn't support "Custom Fields" so, they had to call back the software company which has developed this application in order to request these new updates in their data model.
> Scenario if "Custom Fields" was supported:
> =============================
> When any enterprise that is using an application that support "Custom Fields" needs to add attributes for their existing entities, they will just need to open the "Settings" page of their application and add these new fields to existing entity then they restart the application. The new fields are now ready to use!
> How to Design an Application with "Custom Fields" support?
> ========================================
> 1- All Hibernate Entities that will need to have "Custom Fields" supported will need to implement an interface called "ExtensibleEntity" or they can inherit from "DefaultExtensibleEntity"
> 2- In hibernate configuration, you need to set the property "hibernate.hbm2ddl.auto" to "update"
> 3- For Hibernate Applications, use "CustomFieldsConfiguration" to build session factories.
> For Spring Applications, use "SpringCustomFieldsFactoryBean" to build LocalSessionFactoryBean.
> 4- The UI should have pages for adding custom fields which will call the methods provided in "CustomFieldsConfiguration" or "SpringCustomFieldsFactoryBean".
> Current Implementation:
> =================
> The current implementation enables "Custom Fields" support to hibernate or spring applications that are using hibernate for persistent.
> Current Limitations:
> ==============
> The current implementation only supports adding new custom fields of premitive types.
--
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