Hello, I have a char(6) column that I want to map to System.String. The problem is that NHibernate maps it to "text" by default, which generates queries like this:
SELECT .... WHERE x = 'bla'::text This works, but is very slow because PostgreSQL does a table scan because "text" != "char(6)". If I change the "::text" to "::char(6)" or omit it completely it uses the index and is much faster. My first try to solve this: <property name="Foo" type="String"> <column name="foo" sql-type="char(6)" not-null="true" /> </property> Same result: the sql-type attribute is ignored (no error when I set it to a random value). Setting type="text" makes no difference either. How can I force VARCHAR column type for PostgreSQL? Thanks in advance. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
