change the static final variables from private to protected for subclass usage #318

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@raystorm

I have a case where I want to extend SQLServer2005Dialect to enable NVARCHAR usage.

like so

registerHibernateType(Types.NVARCHAR, StandardBasicTypes.STRING.getName() );
registerHibernateType(Types.LONGNVARCHAR, StandardBasicTypes.STRING.getName() );
registerHibernateType(Types.NVARCHAR, 8000, StandardBasicTypes.STRING.getName());

registerColumnType(Types.NVARCHAR, "nvarchar(MAX)");
registerColumnType(Types.LONGNVARCHAR, "nvarchar(MAX)");
registerColumnType(Types.NVARCHAR, 8000, "nvarchar($1)");

which works. however, SQLServer20005Dialect has a constant MAX_LENGTH that = 8000, it would be nice to just use the MAX_LENGTH constant in my subclass rather then copy-pasting the value.

@stliu
Hibernate member

the _ SQLServer2005Dialect_ has changed dynamically, you may need to recreate a new pull request, sorry for the inconvenient

@stliu stliu closed this Oct 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment