You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Rodrigo Souza <ac...@gmail.com> on 2007/06/27 16:28:03 UTC
Make sure all FK names are <= 18 characters
Hi Community!
I made an alteration to correct a BUG in the verification of the size
of the name of relations.
It is approved?
The source:
Class : org.ofbiz.entity.model.ModelEntityChecker
Method : checkEntities
Line 209
// make sure all FK names are <= 18 characters but now read in XML Config
DatasourceInfo di =
EntityConfigUtil.getDatasourceInfo(delegator.getEntityHelperName(relation.getRelEntityName()));
if ( relation.getFkName().length() > di.constraintNameClipLength ) {
warningList.add("[RelFKNameGT] The foregn key name (length:" +
relation.getFkName().length()
+ ") was greater than " + di.constraintNameClipLength
+ " characters in length for relation " + relation.getTitle()
+ relation.getRelEntityName()
+ " of entity " + entity.getEntityName() + ".");
}
Re: Make sure all FK names are <= 18 characters
Posted by Jacques Le Roux <ja...@les7arts.com>.
Please create a Jira Issue instead
http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
Jacques
De : "Rodrigo Souza" <ac...@gmail.com>
> Hi Community!
> I made an alteration to correct a BUG in the verification of the size
> of the name of relations.
> It is approved?
> The source:
>
>
> Class : org.ofbiz.entity.model.ModelEntityChecker
>
> Method : checkEntities
> Line 209
> // make sure all FK names are <= 18 characters but now read in XML Config
>
> DatasourceInfo di =
> EntityConfigUtil.getDatasourceInfo(delegator.getEntityHelperName(relation.getRelEntityName()));
>
>
> if ( relation.getFkName().length() > di.constraintNameClipLength ) {
>
> warningList.add("[RelFKNameGT] The foregn key name (length:" +
> relation.getFkName().length()
> + ") was greater than " + di.constraintNameClipLength
> + " characters in length for relation " + relation.getTitle()
> + relation.getRelEntityName()
> + " of entity " + entity.getEntityName() + ".");
> }