does nhibernate work with medium trust out of the box?
will nhibernate work under medium trust out of the box? ...
will nhibernate work under medium trust out of the box? ...
Background I am using a legacy database with all kinds of ugly corners. One bit is auditing. There is a table listing tablename/field combinations of fields that should have an audit trail. For example, if there is a row that has "WORKORDER" for the table name and "STATUS" for the fieldname, then I need to add row(s) to the auditing tab...
I find myself writing code like the following quite a lot: if (myEntity.Id == default(Guid)) Session.Save(myEntity); What is the best way to check if an entity is already persistent (and therefore doesnt need to be saved)? Am I doing something wrong writing code like this? ...
Hi, I'm new to Hibernate, I just started to do a mapping to a table, but I'm having some problems when I try to write an object, here's my unit test: [TestFixture] public class FacilityRepositoryTest : DatabaseRepositoryTestsBase { private IRepository<Facility> repository = new Repository<Facility>(); [Test] public void Can...
I have trying to install nhibernate according this tutorial, but it doesn't say where I should place Cat.hbm.xml file and how project should understand its part of project. <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="QuickStart" assembly="QuickStart"> <class name="Cat" table="...
When i map columns from the inspected table, i do this: <property name="InstanceName" type="MyNameUserType, MyApp.MyNamespace"> <column name="Name"/> <column name="Name2"/> </property> How can I make property mapping initialize a UserType with data retrieved by the formula's sql query? <property name="InstanceName" type="MyName...
hi, I have the following named Queryé, whose result I like to get mapped on a class. <sql-query name="GetIndustryCodes"> <return class="IndustryCode"> <return-property name="Sector_kategorie" column="Sector_kategorie"/> <return-property name="Sector_scheme_reference" column="Sector_scheme_reference"/> <return-prop...
I have a scenario where we have a lookup table with an additional column. Were it not for this column then a simple many-to-many would save the bacon but but now I have to create a third class which of course is fine too. The problem here though is that I can't make cascading work and have to resort to calling Session.SaveOrUpdate(object...
How can I access the value of an out parameter of an oracle stored procedure in the .net code - Oracle stored procedure being called via Nhibernate? Sample working code would help. ...
i have an app with fluent nhibernate mappings.. when i start the app first time and initiate a session and a configuration an a session factory for the first time i see in the console that the session do some updates inserts and select on my mapped class any one can explain this please..? i see stuff like AbstractEntityPersister.Inser...
Hello, I can't seem to find any solid answer to the problem, I'm hoping someone will be able to help me here. Sample query: select * from A a inner join B b on a.Id = b.Id Or a.Date = b.Date Basically I want to know if it's possible to implement the second part of the join condition using criteria, and if it is possible, how to go a...
I use Castle ActiveRecord as my persistance layer. I got this functions that must return the first 20 users from the database. IList<User> users = new List<User>(); var userQuery = from u in User.FindAll() orderby u.CreationDate select u; return userQuery.Take(20).ToList(); In my database, I currentl...
I have to create a very high performance application. Currently, I am using Entity Framework for my data access layer. My application has to insert some communication data almost every second. I found that Entity Framework is slow; it has about 2 seconds delay to finish the SaveChanges() method. I was thinking I have the following optio...
In my project, Lines can be grouped and a Group has a type which can be either Crossing (1) or Parallel (2). I need to find all lines which has at least one group of a specified type (in this case, 1). The Id of a given line can be either on column LineA or LineB of a group. Here is where i got so far: Criteria crit = session.CreateCrit...
i have a 3 tier app, .net 3.5 one db infinite servers that talks directly with him. my orm impl is fluent nhibernate. i wanna use second level cache on servers cause of the long distance between them and the db. whats best cache provider for my case? i already implemented a notification mechanism that can clear updated items from cache ...
Let say I have a request table, that looks as follows: RequestId INT ReferenceNumber VARCHAR Each request is logged in a requestlog table. There are no foreign keys between the tables: RequestLogId INT ReferenceNumber VARCHAR Content VARCHAR The requestlog contains the content of the request, and this content needs to be stor...
I have two related objects: ProgramSession and ProgramTask, with a one-to-many relationship. A ProgramSession has many ProgramTasks. So the objects looks like this: public class ProgramSession { public virtual IList<ProgramTask> ProgramTasks { get { return _programTasks; } set { _programTasks = value; } } } ...
Hi, We have an existing C# project based on NHibernate and WPF. I am asked to convert it to Linux and to consider other implementation like Python. But for some reason, they like NHibernate a lot and want to keep it. Do you know if it's possible to keep the NHibernate stuff and make it work with Python ? I am under the impression that...
Is it possible to change my local dev environment (preferrably just a single IIS site) to work under medium trust? ...
I have a many to many relationship between a Team and an Employee entity. I mapped them as following: public class EmployeeMap : ClassMap<Employee> { public EmployeeMap() { // identifier mapping Id(p => p.Id).Column("EmployeeID"); // column mapping Map(p => p.EMail); Map(p => p.LastName)...