Tagged Questions
2
votes
0answers
70 views
Wrong column type - Found varchar2, Expected NVARCHAR2(255)
i have a mapping configuration for a composite-key using fluent nhibernate and i need some help, because it is not working.
I have one class called Agencia that have a composite key for two Int16 ...
2
votes
0answers
301 views
Fluent NHibernate trying to map subclass of subclass using table-per-subclass
I am building an application with heavy inheritance and have a part where there exists classes, A, B and C with:
class A
class B : A
class C : B
I implemented subclass mapping as a ...
1
vote
0answers
23 views
Fluent Nhibernate mapping not created after delete and add the same database
I am using fluent nhibernate to create 3 databases at run time using 3 sessions.
ISessionFactory sessionFactory = Fluently.Configure()
.Database(MsSqlConfiguration
.MsSql2008
...
1
vote
0answers
46 views
NHibernate doesn't persist changes when I mark a property as lazy loaded
I have the following class map:
public UsersMap()
{
Table("Users");
Id(x => x.Id);
Map(x => x.Name);
Map(x => ...
1
vote
0answers
141 views
Calling stored procedure usign Nhibernate named query
I am facing some problem while calling procedure using named query in nhibernate.I have a procedure which accept three parameters, first one is varchar(max) which is actually a guid list, second is ...
1
vote
0answers
27 views
Fluent Nhibernate Automapping. An association refers to an unmapped base class
I have the following situation:
AssemblyX with db entities refers external assemblyY and use its classes as base classes. AssemblyX adds some navigation properties if necessary.
Of course I can ...
1
vote
0answers
30 views
How to map an value object in his own table with Fluent NHibernate?
I have the following scenario: I have a component of an entity, but instead of store it in the same table I need to store in a separate table. The relationship between this two tables is one to one ...
1
vote
0answers
122 views
Postgres arrays in Fluent Nhibernate
I've got some experience with NHibernate but I'm new to Postgres. I'm having trouble mapping a list of strings to a Postgres text[] column.
When retrieving an object I get an InvalidCastException: ...
1
vote
0answers
119 views
NHibernate mapping exception using ReferencesAny on property whose type is an interface
I'm trying to use ReferencesAny() in a Fluent NHibernate automapping override to map a property whose type is an interface. I've found many examples and similar questions that all indicate using ...
1
vote
0answers
148 views
nHibernate - One to One mapping, working only one way
I have the following setup in the database:
Parent : Table
{
ParentId : int, PK
Name : varchar
}
Child : Table
{
ChildId : int, PK
ParentId : int, FK, unique
Name : varchar
}
I have ...
1
vote
0answers
88 views
How to map some properties from an associated tabel
I have the following tables:
CREATE TABLE [dbo].[FirstChild](
[Id] [bigint] IDENTITY(1,1) NOT NULL,
[ExternalId] [bigint] NOT NULL,
[Version] [int] NOT NULL,
[Title] [nvarchar](250) ...
1
vote
0answers
297 views
NHibernate filter not applied on eagerly fetched child entities
I have a following data model:
Category
Date
Products
Product
Date
Payments
Payment
Date
I wish to eager load the whole tree using NHibernate. I thought of doing it like that:
var ...
1
vote
0answers
93 views
NHibernate automapping with spatial datatypes
I'm trying to use automapping from fluent nhibernate with the Point datatype from the spatial extensions. I have a class A with the following property
public virtual Point Location { get; set; }
and ...
1
vote
0answers
342 views
Reference entity with composite id
Both entity A & B's id are:
CompositeId().KeyProperty(x => x.Id).KeyProperty(x => x.Type);
While entity B should Reference entity A (it has a property "A" of type A). I tried:
...
1
vote
0answers
165 views
Are there examples of SPROC mappings and usage with Fluent NHibernate?
I'm looking for an example of how I would/should use the SqlUpdate, SqlDelete, and SqlInsert parts of Fluent NHibernate in my mappings.
I have a standard
public class MyObjectMap : ...