width of id is not updating

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

width of id is not updating

rajshekhar
I want to change the width of content ID from 20 to 150,I updated the value of id in fieldtypemysql.xml which is in framework/entity/fieldtype.It is showing correctly when i see in webtools entity data maintenance but still storing the content id as max upto 20 chars.
   Is there is any other modification is required in order to get effect of it?


G.Rajshekhar
   
Reply | Threaded
Open this post in threaded view
|

Re: width of id is not updating

Scott Gray
Perhaps this will not update existing columns, have you tried just
expanding the column in the database?  Also, are you sure this is a good
idea, all id fields will now be storing up to 150 characters?

Regards
Scott

rajshekhar wrote:

> I want to change the width of content ID from 20 to 150,I updated the value
> of id in fieldtypemysql.xml which is in framework/entity/fieldtype.It is
> showing correctly when i see in webtools entity data maintenance but still
> storing the content id as max upto 20 chars.
>    Is there is any other modification is required in order to get effect of
> it?
>
>
> G.Rajshekhar
>    
>  

Reply | Threaded
Open this post in threaded view
|

Re: width of id is not updating

rajshekhar
Actually i tested by adding new content also, But the newly added content also taking 20 characters, I am also not sure whether this good solution,just i think that this is one of the solution

   Is there is any other way?

G.Rajshekhar
Reply | Threaded
Open this post in threaded view
|

Re: width of id is not updating

Scott Gray
what are you trying to achieve?

rajshekhar wrote:
> Actually i tested by adding new content also, But the newly added content
> also taking 20 characters, I am also not sure whether this good
> solution,just i think that this is one of the solution
>
>    Is there is any other way?
>
> G.Rajshekhar
>  

Reply | Threaded
Open this post in threaded view
|

Re: width of id is not updating

rajshekhar
Actually i want to increase the lenght of content id to 150, default ofbiz provides only 20 characters. Since content id is of id variable i modified the property in fieldmysql.xml as
<field-type-def type="id" sql-type="VARCHAR(150)" java-type="String"></field-type-def>
But still it is taking 20 characters max.

G.Rajshekhar
Reply | Threaded
Open this post in threaded view
|

Re: width of id is not updating

Scott Gray
What i mean is, why do you want contentId to be 150 characters long? Why
aren't you using contentName or description for something so long?


rajshekhar wrote:
> Actually i want to increase the lenght of content id to 150, default ofbiz
> provides only 20 characters. Since content id is of id variable i modified
> the property in fieldmysql.xml as
> <field-type-def type="id" sql-type="VARCHAR(150)"
> java-type="String"></field-type-def>
> But still it is taking 20 characters max.
>
> G.Rajshekhar
>  

Reply | Threaded
Open this post in threaded view
|

Re: width of id is not updating

rajshekhar
hi
  The requirement is such that i have  to take content-id as part of customised url. Therefore i need content id to be longer

G.Rajshekhar
Reply | Threaded
Open this post in threaded view
|

Re: width of id is not updating

Scott Gray
Like I said before try changing the column size in mysql as well as in
the fieldtype def.

rajshekhar wrote:
> hi
>   The requirement is such that i have  to take content-id as part of
> customised url. Therefore i need content id to be longer
>
> G.Rajshekhar
>  

Reply | Threaded
Open this post in threaded view
|

Re: width of id is not updating

rajshekhar
hi
    Yes, you are correct,it has not updated content id in mysql,so now  i have to explictly change size of columns of content id in mysql in order to characters more than 20.
Thanks very much for your suggestion

G.Rajshekhar
Reply | Threaded
Open this post in threaded view
|

Re: width of id is not updating

cjhowe
I would strongly suggest against doing it this way.
You now must also update all contentId foreign key
sizes.  A much simpler way of achieving what it looks
like you're trying to do is to add a field to Content
called externalId and index it without duplicates.

--- rajshekhar <[hidden email]> wrote:

>
> hi
>     Yes, you are correct,it has not updated content
> id in mysql,so now  i
> have to explictly change size of columns of content
> id in mysql in order to
> characters more than 20.
> Thanks very much for your suggestion
>
> G.Rajshekhar
> --
> View this message in context:
>
http://www.nabble.com/width-of-id-is-not-updating-tf2094948.html#a5775953
> Sent from the OFBiz - User forum at Nabble.com.
>
>