I added support for setting collation for columns, hard to submit a patch
because of other modifications, but here are the pieces:
Add Class:
public class CollationAttribute: Attribute
{
public string Value { get; private set; }
public CollationAttribute( string collation )
{
Value = collation;
}
}
Add to Column class:
public string Collation { get; protected set; }
Add to PropColumn constructor:
Collation = Orm.Collation( prop );
Add to ORM:
public static string Collation( PropertyInfo p )
{
var attrs = p.GetCustomAttributes( typeof( CollationAttribute ), true );
if( attrs.Length > 0 )
return ((CollationAttribute)attrs[0]).Value;
else
return string.Empty;
}
Add to SqlDecl after IsNullable:
if( !string.IsNullOrEmpty( p.Collation ) )
decl += "COLLATE " + p.Collation + " ";
Original issue reported on code.google.com by roman...@gmail.com on 23 Oct 2010 at 4:07
Original issue reported on code.google.com by
roman...@gmail.com
on 23 Oct 2010 at 4:07