As you can see the Table names are not quoted at all .
The table can not be found in db because it is an association name
created by FNH -YechidaGroupToProductsGroup  .
It's two names of my two entities that i'm trying to connect through
the join .
The columns became quoted after start usage of 164 dll of FNH.

How can I resolve the unrecognizing mistake of the table created by
FNH ?

Here is the mistake stack -
------ Test started: Assembly: Ness.DoarKamuti.DataLayer.Tests.dll
------

TestCase
'M:Ness.DoarKamuti.DataLayer.Tests.ProductsGroupMappingTests.TestProductsGroupMapping'
failed: could not initialize a collection:
[Ness.DoarKamuti.Infrastructure.Entities.ProductsGroup.Col_yig#403]
[SQL: SELECT col_yig0_."PIG_GROUP_RECID" as PIG1_2_,
col_yig0_."YIG_GROUP_RECID" as YIG2_2_, yechidagro1_."YIG_RECID" as
YIG1_29_0_, yechidagro1_."YIG_FROM_TOKEF" as YIG2_29_0_,
yechidagro1_."YIG_UNTIL_TOKEF" as YIG3_29_0_,
yechidagro1_."YIG_YECHIDAID" as YIG4_29_0_,
yechidagro1_."YIG_GROUP_RECID" as YIG5_29_0_,
yechidatdo2_."YDR_YECHIDAT_DOARID" as YDR1_14_1_,
yechidatdo2_."YDR_DELIVERYNUM" as YDR2_14_1_ FROM
YechidaGroupToProductsGroup col_yig0_ left outer join
T_YECHIDOT_DOAR_IN_GROUP yechidagro1_ on
col_yig0_."YIG_GROUP_RECID"=yechidagro1_."YIG_RECID" left outer join
YECHIDAT_DOAR yechidatdo2_ on
yechidagro1_."YIG_YECHIDAID"=yechidatdo2_."YDR_YECHIDAT_DOARID" WHERE
col_yig0_."PIG_GROUP_RECID"=?]
        NHibernate.Exceptions.GenericADOException: could not initialize a
collection:
[Ness.DoarKamuti.Infrastructure.Entities.ProductsGroup.Col_yig#403]
[SQL: SELECT col_yig0_."PIG_GROUP_RECID" as PIG1_2_,
col_yig0_."YIG_GROUP_RECID" as YIG2_2_, yechidagro1_."YIG_RECID" as
YIG1_29_0_, yechidagro1_."YIG_FROM_TOKEF" as YIG2_29_0_,
yechidagro1_."YIG_UNTIL_TOKEF" as YIG3_29_0_,
yechidagro1_."YIG_YECHIDAID" as YIG4_29_0_,
yechidagro1_."YIG_GROUP_RECID" as YIG5_29_0_,
yechidatdo2_."YDR_YECHIDAT_DOARID" as YDR1_14_1_,
yechidatdo2_."YDR_DELIVERYNUM" as YDR2_14_1_ FROM
YechidaGroupToProductsGroup col_yig0_ left outer join
T_YECHIDOT_DOAR_IN_GROUP yechidagro1_ on
col_yig0_."YIG_GROUP_RECID"=yechidagro1_."YIG_RECID" left outer join
YECHIDAT_DOAR yechidatdo2_ on
yechidagro1_."YIG_YECHIDAID"=yechidatdo2_."YDR_YECHIDAT_DOARID" WHERE
col_yig0_."PIG_GROUP_RECID"=?] --->
System.Data.OracleClient.OracleException: ORA-00942: table or view
does not exist

        at System.Data.OracleClient.OracleConnection.CheckError
(OciErrorHandle errorHandle, Int32 rc)
        at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle
statementHandle, CommandBehavior behavior, Boolean needRowid,
OciRowidDescriptor& rowidDescriptor, ArrayList&
resultParameterOrdinals)
        at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle
statementHandle, CommandBehavior behavior, ArrayList&
resultParameterOrdinals)
        at System.Data.OracleClient.OracleCommand.ExecuteReader
(CommandBehavior behavior)
        at System.Data.OracleClient.OracleCommand.ExecuteDbDataReader
(CommandBehavior behavior)
        at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader
()
        at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd)
        at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean
autoDiscoverTypes, Boolean callable, RowSelection selection,
ISessionImplementor session)
        at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session,
QueryParameters queryParameters, Boolean returnProxies)
        at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections
(ISessionImplementor session, QueryParameters queryParameters, Boolean
returnProxies)
        at NHibernate.Loader.Loader.LoadCollection(ISessionImplementor
session, Object id, IType type)
           --- End of inner exception stack trace ---
        at NHibernate.Loader.Loader.LoadCollection(ISessionImplementor
session, Object id, IType type)
        at NHibernate.Loader.Collection.CollectionLoader.Initialize(Object
id, ISessionImplementor session)
        at
NHibernate.Persister.Collection.AbstractCollectionPersister.Initialize
(Object key, ISessionImplementor session)
        at
NHibernate.Event.Default.DefaultInitializeCollectionEventListener.OnInitializeCollection
(InitializeCollectionEvent event)
        at NHibernate.Impl.SessionImpl.InitializeCollection
(IPersistentCollection collection, Boolean writing)
        at NHibernate.Collection.AbstractPersistentCollection.Initialize
(Boolean writing)
        at NHibernate.Collection.AbstractPersistentCollection.Read()
        at NHibernate.Collection.AbstractPersistentCollection.ReadSize()
        at NHibernate.Collection.PersistentBag.get_Count()
        C:\NetProjects\NESS\Ness.DoarKamuti\Ness.DoarKamuti.DataLayer.Tests
\MappingTests\ProductsGroupMappingTests.cs(29,0): at
Ness.DoarKamuti.DataLayer.Tests.ProductsGroupMappingTests.TestProductsGroupMapping
()

2010-01-24 15:47:38,980 [TestRunnerThread] DEBUG NHibernate.SQL -
SELECT productsgr0_."PIG_RECID" as PIG1_30_0_,
productsgr0_."PIG_FROM_TOKEF" as PIG2_30_0_,
productsgr0_."PIG_GROUP_RECID" as PIG3_30_0_,
productsgr0_."PIG_PRODUCTID" as PIG4_30_0_,
productsgr0_."PIG_UNTIL_TOKEF" as PIG5_30_0_ FROM T_PRODUCTS_IN_GROUP
productsgr0_ WHERE productsgr0_."PIG_RECID"=:p0;:p0 = 403
2010-01-24 15:47:39,121 [TestRunnerThread] DEBUG NHibernate.SQL -
SELECT col_yig0_."PIG_GROUP_RECID" as PIG1_2_,
col_yig0_."YIG_GROUP_RECID" as YIG2_2_, yechidagro1_."YIG_RECID" as
YIG1_29_0_, yechidagro1_."YIG_FROM_TOKEF" as YIG2_29_0_,
yechidagro1_."YIG_UNTIL_TOKEF" as YIG3_29_0_,
yechidagro1_."YIG_YECHIDAID" as YIG4_29_0_,
yechidagro1_."YIG_GROUP_RECID" as YIG5_29_0_,
yechidatdo2_."YDR_YECHIDAT_DOARID" as YDR1_14_1_,
yechidatdo2_."YDR_DELIVERYNUM" as YDR2_14_1_ FROM
YechidaGroupToProductsGroup col_yig0_ left outer join
T_YECHIDOT_DOAR_IN_GROUP yechidagro1_ on
col_yig0_."YIG_GROUP_RECID"=yechidagro1_."YIG_RECID" left outer join
YECHIDAT_DOAR yechidatdo2_ on
yechidagro1_."YIG_YECHIDAID"=yechidatdo2_."YDR_YECHIDAT_DOARID" WHERE
col_yig0_."PIG_GROUP_RECID"=:p0;:p0 = 403

0 passed, 1 failed, 0 skipped, took 13.86 seconds (Ad hoc).


------------------------------------------------------------



On Jan 24, 4:11 pm, James Gregory <[email protected]> wrote:
> FYI, Fluent NHibernate has *always* auto-quoted table names, but we have
> recently just changed it to auto-quote column names aswell.
>
>
>
> On Sun, Jan 24, 2010 at 2:05 PM, clayton collie <[email protected]> wrote:
> > are you still getting the "not found" error ?
>
> > if you know the table or view exists in the DB, then you're probably
> > running into tables/views which have quoted names. If they are not quoted in
> > the db, id check the archive from about a day or so ago. it seems that
> > recent versions of Fluent would auto-quote table names....
>
> > On Sun, Jan 24, 2010 at 8:27 AM, Gregory Kaidanov <[email protected]>wrote:
>
> >> I just shortened my Entity Files names so that the combination is less
> >> than 30 letters , but I don't think that it is a good solution .
> >> No real alias table issue solution was found.
>
> >> On Jan 24, 1:11 pm, Gregory Kaidanov <[email protected]> wrote:
> >> > well , I've tried to do that.
>
> >> >                 HasManyToMany<YechidotDoarInGroup>(x => x.Col_yig)
> >> >                     .Table("PigToYig")
> >> >                     .ChildKeyColumn("YIG_GROUP_RECID")
> >> >                     .ParentKeyColumn("PIG_GROUP_RECID");
>
> >> > but I've got
> >> > ORA-00942: table or view does not exist
> >> > I am trying to establish  HasManyToMany connection not by ID , but by
> >> > some other property .
> >> > First I've got - too long message.
> >> > When I've tried to enter my own Table name as an alias , it's not
> >> > recognized .
> >> > What should I do?
>
> >> > On Jan 21, 9: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%2Bunsubscr
> >> > > >  [email protected]><fluent-nhibernate%2Bunsubscr
> >> [email protected]>
> >> > > > .
> >> > > > For more options, visit this group at
> >> > > >http://groups.google.com/group/fluent-nhibernate?hl=en.
>
> >> > > --
> >> > > - Hudsonhttp://www.bestguesstheory.comhttp://
> >> 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%2Bunsubscr
> >>  [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]<fluent-nhibernate%2Bunsubscr 
> > [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