I have to describe interconnection between objects.
public class Entity
{
public string Name {get;set;}
public IList<Entity> Connections {get;set;}
}
How can i persist this?
I add another layer of complexity: querying on a specific date a connection between two entities can't be already defined. So probably I need a support t...
I have 2 classes that have a many to many relationship.
What i'd like to happen is that whenever i delete one side ONLY the association records will be deleted with no concern which side i delete.
simplified model:
classes:
class Qualification
{
IList<ProfessionalListing> ProfessionalListings
}
class ProfessionalListing
{
...
I have a class generated from a WSDL that has a bunch of public properties and a public event. I'm extending this class with my own and adding some properties to it. All of my own properties are declared virtual, but the base class properties are not virtual.
I'm using Fluent NHibernate's ClassMap to map only the properties from my exte...
I'm importing data that may or may not exist already in my database. I'd like NHibernate to associate any entities with the existing db one if it exists (probably just setting the primary key/id), or create a new one if it doesn't. I'm using S#arp architecture for my framework (MVC 2, NHibernate, Fluent).
I've added the [HasUniqueDoma...
I want to use Fluent NHibernate in commercial desktop application, and I'm little concerned about the licensing. I've downloaded Fluent NHibernate precompiled binaries, and it contains this list of files:
Antlr3.Runtime.dll
Castle.Core.dll
Castle.DynamicProxy2.dll
FluentNHibernate.dll
Iesi.Collections.dll
log...
Simple question: does it matter which side of a bidirectional many-to-many relationship you set as the inverse in NHibernate? And if so, what are the implications of setting it on one end vs. the other?
Some more clarification: I'm setting both sides of the relationship:
Parent.Children.Add(child);
Child.Parents.Add(parent);
In a cas...
Is there a way to setup SQLite connection pooling using Fluent NHibernate configuration?
E.g. equivalent of DataSource=:memory: would be:
var sessionFactory = Fluently
.Configure()
.Database(SQLiteConfiguration.Standard.InMemory)
(etc.)
Is there something eqivalent to "Pooling=True;Max Pool Size=1;"?
...
I have this class:
public class MyEntity
{
public virtual int Id { get; set; }
public virtual IList<Point> Vectors { get; set; }
}
How can I map the Vectors in Fluent NHibernate to a single column (as value)? I was thinking of this:
public class Vectors : ISerializable
{
public IList<Point> Vectors { get; set; }
/* H...
Hi everyone. My problem is fluent nhibernate mapping a many to many relationship, they end up referencing a non existent Id.
public UserMap()
{
Id(x => x.Id);
Map(x => x.Name);
Map(x => x.Password);
Map(x => x.Confirmed);
HasMany(x => x.Nodes).Cascade.SaveUpdate();
HasManyToMany<Node>(...
I have the following situation. I have a Movie object which contains a list of characters, and the characters each have an person (actor). Additionally, I want the actor objects to contain a list of characters.
I've set up my mappings in fluent-nhibernate, and everything seems to be working perfectly, except that the Person.Characters...
Hi, I'm using NHibernate with my ASP.Net MVC application.
I'm writing some extensions (plugins) for my application. And I'm loading those plugin dynamically (from different assemblies).
In my base application I have many entities and mappings defined (User, Group, etc...)
I need to create new entities in my extensions, so i.e. I'm crea...
There is a CLOB field we are trying to insert html content and sometimes we are getting an error as:
ORA-01461: can bind a LONG value only for insert into a LONG column
When i used nhibernate profiler and copy the query to Toad, it asked me to enter values for variables called "NBSP"!
Is this means that nhibernate doesnt escape spe...
Given that I am implementing a read-only UI, how do I create a ClassMap for Shop:
public class Shop {
public int Id { get; set; }
public City City { get; set; }
}
public class City {
public string Name { get; set; }
public string CountryCode { get; set; }
}
The DB interface for Shops is a View containing 3 columns (Sh...
I want to map the Name column from the Child table into the Parent object. How do you do this (using Fluent NHibernate)?
public class Parent
{
public int Key { get; set; }
public string ChildName { get; set; }
}
Tables
+--------------+ +------------------+
| Parent | | Child |
+--------------+...
Do mapping attributes offer the same versatility as nhib hbm's do? Can you use them together with FNH to handle things FNH doesn't yet do as well as hbm's can?
Cheers,
Berryl
By mapping attributes, I don't mean hbm files; there are apparently attributes that come with NHib (or maybe NHib contrib these days) that you use to decorate you...
Hi,
I have a many-to-many mapping defined (only relevant fields included) with FluentNHibernate (v1.0.0.637):
// MODEL:
public class User : IPersistentObject {
public User() {
Permissions = new HashedSet<Permission>();
}
public virtual int Id { get; protected set; }
public virtual ISet<Permission> Permissions { ...
I have a root object that has a property that is a collection.
For example:
I have a Shelf object that has Books.
// Now
public class Shelf
{
public ICollection<Book> Books {get; set;}
}
// Want
public class Shelf
{
public IQueryable<Book> Books {get;set;}
}
What I want to accomplish is to return a collection that is IQu...
Hi,
I'm working on a bug tracking application. There are tickets, and each ticket has an opener user and an assigned user. So, basically, I have two entities, which have two many-to-one relationships with each other. Their schematic is this:
User:
public class User
{
public virtual int Id { get; protected set; }
...
publi...
As an FNH user, do you find you sometimes need to supplement FNH with an hbm file? Any relatively common edge cases where you do, if so?
Cheers,
Berryl
...
I'm testing out using LINQ with NHibernate but have run into some problems with resolving string.length. I have the following
public class DC_Control
{
public virtual int ID { get; private set; }
public virtual string Name { get; set; }
public virtual bool IsEnabled { get; set; }
public virtual string Url { get; set; }
...