Don't put the database name in the mapping file. Let NHibernate's
connection string figure out the database location. In your mappings,
you only need to specify the table names (e.g. 'aspnet_users') in the
WithTable() method. If you need to identify schema, specify SchemaIs
("myschemaname"). NHibernate takes it from there.


 - b


On Feb 9, 10:28 am, James Gregory <[email protected]> wrote:
> I'd say that issue is still affecting you then, because that exception
> is saying it can't find the table.
>
> Have you investigated this issue much? Sounds like it's either
> something wrong with your connection string or the priviledges for the
> user you're connecting as.
>
> On 2/9/09, Pete <[email protected]> wrote:
>
>
>
> > Yes,   if I just specify the the table name,  sometimes the DB likes
> > me and will find the table other times it will not like me and tell me
> > the table is not found.   I get this with linq-sql  too.   This is not
> > a fluent issue.  Therefore if I specify the full db.schema.table  I do
> > not have an issue about access.
>
> > On Feb 9, 7:43 am, James Gregory <[email protected]> wrote:
> >> Is there a reason you're using the full database.schema.table format?
> >> Have you tried just specifying the table name?
>
> >> On 2/9/09, Pete <[email protected]> wrote:
>
> >> > James,  thanks for the quick response.   The IList fix the problem.
> >> > But I am still having issues with the collections.   I am now getting
> >> > this error message....
>
> >> > _Test_EOMapping.UserPermissionTest.DisplayOneRow:
> >> > NHibernate.Exceptions.GenericADOException : could not initialize a
> >> > collection: [SnapsInTime.EO.UserPermission.allRoles#ab68b9ac-f2e5-4147-
> >> > a143-00a405d47e39][SQL: SELECT allroles0_.UserPermission_id as
> >> > UserPerm1_1_, allroles0_.UserRoles_id as UserRoles2_1_,
> >> > userroles1_.RoleId as RoleId1_0_, userroles1_.RoleName as RoleName1_0_
> >> > FROM [SnapData].[dbo].[aspnet_UsersInRole] allroles0_ left outer join
> >> > [SnapData].[dbo].[aspnet_Users] userroles1_ on
> >> > allroles0_.UserRoles_id=userroles1_.RoleId WHERE
> >> > allroles0_.UserPermission_id=?]
> >> >   ----> System.Data.SqlClient.SqlException : Invalid object name
> >> > 'SnapData.dbo.aspnet_UsersInRole'.
>
> >> > On Feb 8, 2:24 pm, James Gregory <[email protected]> wrote:
> >> >> Your UserPermission.allRoles is an List<T>, when it should be an
> >> >> IList<T>;
> >> >> that's why you're getting the conversion error.- Hide quoted text -
>
> >> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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