It works. Thank you.  I have been reading "NHibernate in Action" as a
resource book.  Are there any other good books out there that you
would recommend?

On Jun 16, 4:19 pm, Jason Dentler <[email protected]> wrote:
> Yonah's solution is close. I would also suggest using backticks around the
> table name.
>
> Assuming you are using SQL Server, a mapping of <class name="MyClass"
> table="OurCompany$MyClass"> would show up in SQL statements as SELECT * FROM
> OurCompany$MyClass
>
> A mapping of <class name="MyClass" table="`OurCompany$MyClass`"> would show
> up in SQL as
> SELECT * FROM [OurCompany$MyClass]
>
> NH translates the backticks to whatever your DB uses in these cases.
>
> On Wed, Jun 16, 2010 at 3:40 PM, Humberto Marchezi 
> <[email protected]>wrote:
>
>
>
> > In NHibernate, a class name can be anything you want since acceptable to C#
> > therefore it doesn´t have to follow the tables names.
>
> > For example, you could create a class named as OurCompanyXItem where X is
> > ouyr naming convention for $.
>
> > On Wed, Jun 16, 2010 at 5:23 PM, Yonah Wahrhaftig 
> > <[email protected]>wrote:
>
> >> Use the table attribute.
> >> <class name="classname" table="table$name">
> >> -----Original Message-----
> >> From: Walter Johnson <[email protected]>
> >> Date: Wed, 16 Jun 2010 12:16:05
> >> To: nhusers<[email protected]>
> >> Subject: [nhusers] using the '$'
>
> >> In our central db we have named our table objects with a '$'.  For
> >> example "OurCompany$Item" .
>
> >> In building the POCOs and the mappings in the xml configs I run into
> >> mapping problems because you can't use '$' in the class name in C#.
> >> How do I map a table that has '$' in the name?
>
> >>  I am new to NHibernate and I am building my first application using
> >> this ORM.  I have it configured fine (all config unit tests pass)
>
> >> --
> >> 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.
>
> >> --
> >> 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.
>
> > --
> > Humberto C Marchezi
> > ---------------------------------------------------------
> > Master in Electrical Engineering - Automation
> > Software Consultant and Developer
> > at the Town Hall of Vitória
>
> >  --
> > 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.- Hide quoted text -
>
> - Show quoted text -

-- 
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.

Reply via email to