Re: [nhusers] Difficult Problem - I need to allow end users to create custom entities

2017-11-09 Thread Matt Mangold
uantities? > > /G > > 2017-11-08 17:02 GMT+01:00 Matt Mangold >: > >> I need to create a way for end users to create custom entities and create >> custom relationships between entities. Has anyone done this before in >> NHibernate? >> >> I was th

[nhusers] Difficult Problem - I need to allow end users to create custom entities

2017-11-08 Thread Matt Mangold
I need to create a way for end users to create custom entities and create custom relationships between entities. Has anyone done this before in NHibernate? I was thinking about using Codedom to create entities and mapping files then generating the schema on the fly. I was wondering if there a

[nhusers] Partial domain models

2012-02-27 Thread Matt Mangold
Hi, I am trying to create partial domain models like Ayende describes here: http://ayende.com/blog/3093/creating-partial-domain-models Basically, I have an IUser interface as part of my security model. I want to be able to plug that security model into any application. Lets say I have an applic

[nhusers] Listener or interceptor needed for any "Load" event in the system

2011-10-03 Thread Matt Mangold
Hi, I am designing a security system to ensure that tenant information does not cross tenant boundaries. I have a tenant id in every entity, and I'd like to check this value when any entity in my system is loaded. I'd like to do this in something global like an interceptor or event listener. I

[nhusers] Re: Using a global filter is causing problems in queries with a left outer join

2011-10-03 Thread Matt Mangold
/NH-2877andhttps://nhibernate.jira.com/browse/NH-1930. > The other workaround is to use fetch mode select or subselect. > > RP > > On Sep 30, 3:00 pm, Matt Mangold wrote: > > > > > > > > > I agree that a workaround should not be needed.  I think that the >

[nhusers] Re: Using a global filter is causing problems in queries with a left outer join

2011-09-30 Thread Matt Mangold
ll" is a > workaround. Any "join checking" queries will use the primary key of the > joined table anyway, so there should be no side effects. > > I suggest a JIRA search/submission anyway, since such a workaround should > not be needed. > > /G > > 2011/9/29 Ma

[nhusers] Using a global filter is causing problems in queries with a left outer join

2011-09-29 Thread Matt Mangold
In my application, I have defined a global filter on Tenant Id. I do this to enforce tenant security, so that developers do not accidentally create queries that allow information to cross tenant boundaries. The problem I am having is that when I create queries that eagerly fetch associations, the

[nhusers] Call to configure nhibernate validator is causing a "First chance exception"

2011-05-06 Thread Matt Mangold
I using fluent nhibernate 1.2, NHibernate 3.1 and Nhibernate Validator 1.3 In my session factory, I am making a call to configure the nhibernate validator as prescribed by the community. When I make a call to ValidatorInitializer.Initialize, I get a first chance exception whenever a property on o

[nhusers] Super-type to Subtype

2010-09-16 Thread Matt Mangold
In my application, I have an object hierarchy of Person->Employee- >Administrator. I want to be able to take an existing employee and make them an administrator. I know that in OO world, this is not possible, you must first destroy the employee object create a new Administrator object and build o

[nhusers] Re: Determine which properties of my POCO are mapped at run time

2010-05-06 Thread Matt Mangold
level you want to use. > > On Fri, Apr 30, 2010 at 4:13 PM, Matt Mangold > wrote: > > > > > I am using XML mapping, and I'd like to determine at run time which > > properties of my POCO are mapped.  What is the easiest way to do this? > > > I a

[nhusers] Determine which properties of my POCO are mapped at run time

2010-04-30 Thread Matt Mangold
I am using XML mapping, and I'd like to determine at run time which properties of my POCO are mapped. What is the easiest way to do this? I am building a flexible query tool, and I need to know which properties are mapped so that I can display them to the user when they choose fields for their re

[nhusers] Re: Projecting an unmapped property - criteria query

2010-04-29 Thread Matt Mangold
ttp://ayende.com/Blog/archive/2009/06/10/nhibernate-ndash-query-only...) > which replicates the logic of Age, but in SQL. > It's a bit of a hack, but at least it's transparent to your queries. > >    Diego > > On Wed, Apr 28, 2010 at 18:29, Matt Mangold wrote: > >

[nhusers] Projecting an unmapped property - criteria query

2010-04-28 Thread Matt Mangold
I would like to know if it is possible to create a query where I add an unmapped property to my projected output. Here is an example I have a class called Person Person has 3 properties Name Birthday Age Name and Birthday are mapped to the database, and Age is calculated based on today's date,

[nhusers] Re: Query joining component entity to parent throws exception

2010-04-28 Thread Matt Mangold
s.Property("Address.City")); criteria.SetProjection(pl); var results = criteria.List(); On Apr 27, 3:42 pm, Diego Mijelshon wrote: > What would be a left join to a component exactly? > Also: why don't you post the Criteria code? > >    Diego > > On Tue, Apr 27, 201

[nhusers] Query joining component entity to parent throws exception

2010-04-27 Thread Matt Mangold
I am constructing a criteria query between two entities Person and Address. Address is a component in the Person class. In my criteria query I am Left Outer Joining Address to Person so that I can still retrieve People when their address is null. I am also setting 2 fields in my projection: Per

[nhusers] Event Listener for entity being loaded

2009-10-28 Thread Matt Mangold
Is there an event listener I can implement that will let me trap the event where the entity and all child collections are created and loaded? I tried using the IPostLoadEventListener, but the OnLoad method fires before child collections are initialized. --~--~-~--~~~--

[nhusers] Re: Using when records in joined table don't exist

2009-10-28 Thread Matt Mangold
No. Even with the optional set to true, NHibernate will always try to run an update statement on the join table if the entity is being updated. If there is no record in the join table, NHibernate still tries to run an update statement against it. On Oct 28, 11:15 am, Oskar Berggren wrote: >

[nhusers] Using when records in joined table don't exist

2009-10-28 Thread Matt Mangold
Is there a way to use a in your mapping and have NHibernate perform an insert instead of an update if the joined record doesn't exist? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this

[nhusers] Event Listener prior to session SaveOrUpdate()

2009-10-27 Thread Matt Mangold
Is there an NHibernate Event listener interface that I can register so that I am notified prior to SaveOrUpdate() regardless if the entity is dirty or not? I used the ISaveOrUpdate Event listener, but it only fires if the entity is dirty. I would like to be able to trap the event prior to the di

[nhusers] mapping a collection without a key

2009-10-26 Thread Matt Mangold
Domain Object: class A { public virtual ISet ChildCollection { get; set; } } Whenever I load an instance of A, I would like to load every child B. Table A and Table B are not related in the database. There are only a few records in Table B, and they need to be avaialable to every instance of

[nhusers] Re: Custom Fields With NHibernate - Can I lazy load them from a service?

2009-10-26 Thread Matt Mangold
C. > > Valeriu > > On Sat, Oct 24, 2009 at 12:04 AM, Matt Mangold > > > > wrote: > > > My domain objects support custom fields that are stored in such a way > > that requires metadata and logic to be applied before their values can > > be stored and retrieve

[nhusers] Re: Can I lazy load a collection of data from a service, not a database?

2009-10-26 Thread Matt Mangold
Where is the best place to learn about the ICollectionTypeFactory? On Oct 23, 8:26 pm, Fabio Maulo wrote: > The way is not IUserCollectionType but ICollectionTypeFactory > > 2009/10/22 Matt Mangold > > > > > > > > > My domain objects support custom fields th

[nhusers] Can I lazy load a collection of data from a service, not a database?

2009-10-23 Thread Matt Mangold
My domain objects support custom fields that are stored in such a way that requires metadata and logic to be applied before their values can be stored and retrieved. I already have a Custom Field Repository that handles the persistence of custom fields, and I don't want to try to recreate that lo

[nhusers] Custom Fields With NHibernate - Can I lazy load them from a service?

2009-10-23 Thread Matt Mangold
My domain objects support custom fields that are stored in such a way that requires metadata and logic to be applied before their values can be stored and retrieved. I already have a Custom Field Repository that handles the persistence of custom fields, and I don't want to try to recreate that lo