fluent

Fluent NHibernate HasManyToMany IDictionary

I have three tables: Employee, EmployeesCustomer, and Customer. Employee has a primary key called Id. Customer has a primary key called Id. EmployeesCustomer has a composite key made up of two fields, EmployeeId and CustomerId. The EmployeesCustomer does NOT contain any other fields. My goal is to create an IDictionary on the Employee...

Mixing Inheritance and Tree Structure with Fluent nHibernate

Part of a model I'm designing is a hierarchy geographic locations. Since there are multiple layers and share some information I decided to use a class hierarchy like this: public class GeographicNode { public virtual int Id { get; private set; } public virtual string Name { get; set; } public virtual GeographicNode ParentNod...

Which Fluent WCF framework should I use, if any?

Is there any Fluent WCF interface out there worth using? Maybe something like these: http://www.markharris.net.au/blog/category/net/wcf-net/ http://code.google.com/p/vitamink/ http://www.simonsegal.net/blog/2009/03/15/if-i-had-a-fluent-interface-for-wcf-configuration-i-would/ Anyone tried one of these? Which one is the best? ...

Fluent NHibernate Automapping DDL is missing foreign key reference column

I've created the following classes and use the automap functionality of fluent to automatically generate my database: public interface IBaseClass { int Id { get; set; } DateTime CreatedOn { get; set; } } public interface IApplicant : IBaseClass { string Firstname { get; set; } string Lastnam...

Getting error "Association references unmapped class" when using interfaces in model

I'm trying to use the automap functionality in fluent to generate a DDL for the following model and program, but somehow I keep getting the error "Association references unmapped class: IRole" when I call the GenerateSchemaCreationScript method in NHibernate. When I replace the type of the ILists with the implementation of the interfaces...

Fluent NHibernate Many to one mapping

I am new to Hibernate world. It may be a silly question, but I am not able to solve it. I am testing many to One relationship of tables and trying to insert record. I have a Department table and Employee table. Employee and Dept has many to One relationship here. I am using Fluent NHibernate to add records. All codes below. Pls help - S...

fluent nhibernate named-query without using hbm file for the map

I am needing to create a named-query, and use it with one of the maps, that i currently have defined as a fluent map. is it possible to continue using the fluent map, and be able to create the named-query dynamically in code? or, is switching to a hbm map the only option? ...

Getting PDT code completion to recognise runtime return types from base class?

Hi guys, I've got an abstract base class: abstract class BaseClass { /** * @return CLASSNAME */ public function fluent() { // do stuff return $this; } } Generally, i would put BaseClass where CLASSNAME is and all would be fine, PDT would pick up the phpdoc return type and happily autocomplete. Until, that is, I s...

Fluent NHibernate IDictionary with composite element mapping

Hi there, i have these 2 classes: public class Category { IDictionary<string, CategoryResorce> _resources; } public class CategoryResource { public virtual string Name { get; set; } public virtual string Description { get; set; } } and this is xml mapping ...

Fluent interface and task based applications

We have a number of applications that are now looking tired and a bit drab. Looking at the MS style fluent interface looks nice but seems (to me) to be more document based rather than task based. Is there a nice 'modern' ui style that lends itself to task based applications? ...

Fluent nHibernate and mapping IDictionary<DaysOfWeek,IDictionay<int, decimal>> how to?

Hello, I have problem with making mapping of classes with propert of type Dictionary and value in it of type Dictionary too, like this: public class Class1 { public virtual int Id { get; set; } public virtual IDictionary<DayOfWeek, IDictionary<int, decimal>> Class1Dictionary { get; set; } } My mapping looks like this: ...

fluent nHibernate mapping of subclassed structure

I have a workflow class that has a collection of phases, each phase has a collection of tasks. You can design a workflow that will be used by many engagements. When used in engagement I want to be able to add properties to each class (workflow, phase, and task). For example a task in the designer does not have people assigned, but a ta...

Proxy is created, and interceptor is in the __interceptors array, but the interceptor is never called

This is the first time I've used interceptors with the fluent registration and I'm missing something. With the following registration, I can resolve an IProcessingStep, and it's a proxy class and the interceptor is in the __interceptors array, but for some reason, the interceptor is not called. Any ideas what I'm missing? Thanks, Drew...

Big problem with fluent nhibernate, c# and MySQL need to search in BLOB

I've done a big mistake, now I have to find a solution. It was my first project working with fluent nhibernate, I mapped an object this way : public PosteCandidateMap() { Id(x => x.Id); Map(x => x.Candidate); Map(x => x.Status); Map(x => x.Poste); Map(x => x.MatchPossibility); Map(x =>...

Mapping table and a simple view with Fluent NHibernate

I have mapped a simple entity, let's say an invoice using Fluent NHibernate, everything works fine... after a while it turns out that very frequently i need to process 'sent invoices' (by sent invoices we mean all entities that fulfill invoice.sent==true condition)... is there a way to easily abstract 'sent invoices' in terms of my data ...

Does Anyone Know Of A Solid Web Example Using ASP.NET MVC1 or MVC2, NHibernate, Fluent NHibernate & Castle?

I am looking for solid non-console examples of how to use ASP.NET MVC1 or MVC2, NHibernate, Fluent NHibernate & Castle. I looked at Sharp Architecture and its just too much to digest for my newbie mind. I need a clean, clear, concise Step A, Step B, Step C tutorial or a solid example that is a web application and not a console applicatio...

Fluent NHibernate ExportSchema without connection string

I want to generate a database script without having an actual database connection string declared. To do this for now i use NHibernate ExportSchema bases on a NHibernate configuration generated with Fluent NHibernate this way (during my ISessionFactory creation method): FluentConfiguration configuration = Fluently.Configure(); ...

Trouble with abstract generic methods

Let's say I have a class library that defines a couple entity interfaces: public interface ISomeEntity { /* ... */ } public interface ISomeOtherEntity { /* ... */ } This library also defines an IRepository interface: public interface IRepository<TEntity> { /* ... */ } And finally, the library has an abstract class called Repository...

How to map a private identity field in FluentNHibernate?

I'm experimenting with converting my NHibernate mapping files to FluentNHibernate. However, I'm already stuck on my first attempt. Here's a fragment of one XML mapping file: <class name="Contact" table="tblXContacts"> <id name="_id" column="ContactID" unsaved-value="0" access="field"> <generator class="identit...

where can i find some examples for fluent api in ruby?

we have understood the concept of fluent api but now we want to look over some existing fluent api for better understanding. where can i find such examples. have searched alot but could not find it. ...