Re: CompositeId and changing column length problem

7 views
Skip to first unread message

phin...@gmail.com

unread,
Dec 25, 2012, 7:32:42 AM12/25/12
to fluent-n...@googlegroups.com
Sorry please ignore this post.  This is a duplicate.




On Tuesday, December 25, 2012 10:20:24 AM UTC+8, phin...@gmail.com wrote:
For my setup I am using Firebird 2.5 and FluentNHb 1.3.
Now I have a table with 3-column composite Ids:
TransactId bigint
TransactType varchar(2)
EntityId bigint


and mapped this way:
    CompositeId()
        .Mapped()
        .KeyProperty(e => e.TransactId, "TransactId")
        .KeyProperty(e => e.TransactType, p =>
        {
            p.Type(typeof(string));
            p.Length(2);
        })
        .KeyReference(e => e.Entity, "EntityId");


However, I get an exception that the index id exceeded the length.  Looking at the generated DDL, I noticed the TransactType length is still the default varchar(255).
Is there another way around this?  I appreciate any advice on this matter.
Reply all
Reply to author
Forward
0 new messages