Hudson's got it right, except the AsBag() is unnecessary. That is if you're
actually referring to the table name, and not an alias.

On Thu, Jan 21, 2010 at 7:30 PM, Hudson Akridge <[email protected]>wrote:

> HasManyToMany().AsBag().Table("ShorterJoinTableName");
>
> If you're talking about the aliases that are used whenever sql is executed,
> that's an NHibernate question and you should probably repost your question
> over to the nhusers google group. FNH doesn't have any control (that I'm
> think of at least) over the alias names used for association joins.
>
> If you're talking an alias in a query, you can alias joins in a criteria or
> HQL query by using the "AS" keyword.
>
> On Thu, Jan 21, 2010 at 1:10 PM, sternr <[email protected]> wrote:
>
>> I've got a very long table names, and since the alias FNH creates for
>> a join is the name of both the tables, my DataBase (Oracle) gives me:
>> "Identifier Too Long".
>>
>> Is there a way to control the Alias names FNH gives my tables\joins?
>> If not, is there any other solution? (considering its a legacy
>> Database...)
>>
>> Thanks ahead,
>>
>> --sternr
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Fluent NHibernate" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<fluent-nhibernate%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/fluent-nhibernate?hl=en.
>>
>>
>>
>>
>
>
> --
> - Hudson
> http://www.bestguesstheory.com
> http://twitter.com/HudsonAkridge
>
> --
> You received this message because you are subscribed to the Google Groups
> "Fluent NHibernate" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<fluent-nhibernate%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/fluent-nhibernate?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups "Fluent NHibernate" 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/fluent-nhibernate?hl=en.

Reply via email to