Hello Fabio,
i will try to debug to find-out the source of the issue, may be it is from
mssql server's itself.
my only third-party references are...
NHibernate
log4net
Core.Common --> my own dll (some base class definitions only)
Postsharp.Laos --> unrelated using
Postshap.Public --> unrelated using.
... standard System.* references
thanks...
2010/6/30 Fabio Maulo <[email protected]>
> Find all "UQ", Match case, Subfolders, Find Results 1, "Entire Solution"
> Matching lines: 0 Matching files: 0 Total files searched: 3678
>
> The "Entire Solution" is NHibernate.sln
>
> 2010/6/30 Fethi Gürcan <[email protected]>
>
> I don't have anything in the middle except of me :)
>>
>> I'm directly using with assembly reference NHibernate.dll from nh
>> repository. (version 2.1.2.4000)
>>
>> this is the one of the xml mapping of mine... and below that i've wrote my
>> ddl generation code is also mine.
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <hibernate-mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns="urn:nhibernate-mapping-2.2">
>> <import class="XXX.IlSimple, XXX.Common" />
>> <import class="XXX.IlView, XXX.Common" />
>> <class name="XXX.Il, XXX.Data" table="`Il`">
>> <id name="Id" column="`Id`" unsaved-value="0">
>> <generator class="native" />
>> </id>
>> <property name="IslemYapan" column="`IslemYapan`" length="100"
>> not-null="true" />
>> <property name="IslemTarihi" column="`IslemTarihi`" not-null="true" />
>> <property name="Active" column="`Aktif`" not-null="true" />
>> <property name="Kod" column="`Kod`" length="12"
>> not-null="true"*unique-key="UniqueKod"
>> * />
>> <property name="Aciklama" column="`Aciklama`" length="1000" />
>> <property name="Sira" column="`Sira`" />
>> <property name="SistemParametresi" column="`SistemParametresi`"
>> not-null="true" />
>> <property name="Name" column="`Ad`" length="255" not-null="true" />
>> </class>
>> </hibernate-mapping>
>>
>> --- the ddl generation code ()
>>
>> public static void CreateSchema()
>> {
>> NHibernate.Cfg.Configuration cfg;
>> cfg = new NHibernate.Cfg.Configuration();
>> cfg.Configure();
>> Type dialectType = Type.GetType(cfg.Properties["dialect"] + ",
>> NHibernate");
>> NHibernate.Dialect.Dialect dialect =
>> Activator.CreateInstance(dialectType) as NHibernate.Dialect.Dialect;
>> string[] scripts = cfg.GenerateSchemaCreationScript(dialect);
>>
>> StringWriter sw = new StringWriter();
>> foreach (string s in scripts)
>> sw.WriteLine(s + "\r\n");
>>
>> sw.Flush();
>> string createSchemaScript = sw.ToString();
>> sw.Close();
>>
>> System.Data.IDbCommand cmd =
>> XXX.Factory.Session.Connection.CreateCommand();
>> cmd.CommandText = createSchemaScript;
>> cmd.ExecuteNonQuery();
>> }
>>
>> -- and mssql hibernate configuration of mine
>>
>> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
>> <session-factory>
>> <property
>> name="current_session_context_class">thread_static</property>
>> <property
>> name="dialect">NHibernate.Dialect.MsSql2008Dialect</property>
>> <property
>> name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
>> <property
>> name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
>> <property
>> name="connection.connection_string_name">connStr</property>
>> <property name="show_sql">true</property>
>> <property
>> name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory,
>> NHibernate.ByteCode.Castle</property>
>> <mapping assembly="XXX.Data" />
>> </session-factory>
>> </hibernate-configuration>
>>
>> thanks
>>
>> 2010/6/29 Fabio Maulo <[email protected]>
>>
>> That is not NH by default, you have something else in the middle.
>>>
>>> --
>>> Fabio Maulo
>>>
>>>
>>> El 29/06/2010, a las 04:09, "Fethi Gürcan" <[email protected]>
>>> escribió:
>>>
>>> Hello,
>>>
>>> May be it is a basic question, but i couldn't.
>>>
>>> in the mapping file, i have been trying to give a familiar name to my
>>> unique index for a while, (i can give for non-unique indexes)
>>>
>>> so i've tried to use *unique-key="CustomName"* in my mapping file
>>> instead of *unique="true"* attribute.
>>>
>>> or have tried* index="customindex"* and* unique-key="customindex"*together.
>>> (it is generated two indexes one unique and another is'nt :( )
>>>
>>> unique indexes always being created with a generated names like *
>>> UQ_TableName_8764f2fff* :(
>>>
>>> Any clues for me :)
>>>
>>> thanks...
>>>
>>> --
>>> Fethi Gürcan
>>>
>>> --
>>> 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.
>>>
>>> --
>>> 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]<nhusers%[email protected]>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/nhusers?hl=en.
>>>
>>
>>
>>
>> --
>> Fethi Gürcan
>>
>> --
>> 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]<nhusers%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/nhusers?hl=en.
>>
>
>
>
> --
> Fabio Maulo
>
>
> --
> 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]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
--
Fethi Gürcan
--
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.