ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raj Saini <rajsa...@gmail.com>
Subject Re: Alter entity column size or type
Date Sun, 18 May 2008 02:37:57 GMT
Hi Scot,

I agree it would be very critical to alter column on a production 
database. At the same time,  I don't think someone will alter the schema 
of a production system without knowing the consequences.

However, It can be helpful in some cases during development where a 
minor change in the schema is required for example in my case, I want to 
change the type of weightUnitPrice on ShipmentCostEstimate from 
currency-amount to currency-precise. Making the change in base entity 
will bring the pain of merging every time I merge the SVN branch to my 
local branch.

Thanks,

Raj


Scott Gray wrote:
> Hi Raj
>
> I don't think a solution for this would be straightforward, ofbiz wouldn't
> want to alter a column automatically because of the potential for data loss.
>
> Regards
> Scott
>
> 2008/5/18 Raj Saini <rajsaini@gmail.com>:
>
>   
>> Jacques,
>>
>> Thanks for the pointer. Should I create a Jira issue and may be I can pick
>> it up when I understand the entity engine stuff clearly.
>>
>> Thanks,
>>
>> Raj
>>
>> Jacques Le Roux wrote:
>>
>>     
>>> Raj,
>>>
>>> If you look into ModelEntity.java you will find this comment
>>> // TODO: should we look for existing fields of the same name here? for now
>>> just add to list...
>>>
>>> Maybe someone will enchance it one day....
>>>
>>> Jacques
>>>
>>> From: "Raj Saini" <rajsaini@gmail.com>
>>>
>>>       
>>>> Hi,
>>>>
>>>> Is there a way to extend the field  type of a entity using extend-entity
>>>> or any other similar mechanism without modifying the original entity
>>>> definition. I tried using extend-entity by redefining the exiting field with
>>>> a different data type, but it added a new column to the database table
>>>> instead of altering it.
>>>>
>>>> Thanks,
>>>>
>>>> Raj
>>>>
>>>>
>>>>         
>
>   


Mime
View raw message