Search Results

Search found 4565 results on 183 pages for 'nhibernate mapping'.

Page 60/183 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • Mapping over sequence with a constant

    - by Hendekagon
    If I need to provide a constant value to a function which I am mapping to the items of a sequence, is there a better way than what I'm doing at present: (map my-function my-sequence (cycle [my-constant-value])) where my-constant-value is a constant in the sense that it's going to be the same for the mappings over my-sequence, although it may be itself a result of some function further out. I get the feeling that later I'll look at what I'm asking here and think it's a silly question because if I structured my code differently it wouldn't be a problem, but well there it is!

    Read the article

  • How to make my URL mapping case insensitive?

    - by fabien7474
    Grails, by default, is case-sensitive when mapping URL to controller actions or views. For instance, www.mywebsite.com/book/list will work BUT www.mywebsite.com/Book/list will return a 404 page. What can I do (code snippets are welcomed) to make my URL case-insensitive (i.e. www.mywebsite.com/Book/list being a valid url) ?

    Read the article

  • mapping Field with variable type using Hibernate Annotaion

    - by Zahra
    Hi. how can I have a field with variable type in my class? I use hibernate annotation for mapping to DB. I tried to use java.io.Serializable as field's type, but it mapped to database as a 01 amount which is true if I get it's object and cast it to it's true type. but I need to run a query on this objects that needs true amount of field.(right now I can't compare an integer field with a number) Does anyone have any idea how can I do this? Thanks in advance.

    Read the article

  • validate linqtosql mapping to a model

    - by Coppermill
    I have generated a LinqtoSQL mapping xml file, which I have a valid XSD schema that I check to make sure the XML is correct. Now I want to check that the field type match the Model/Interface for example: checking that the nullable fields are nullable that int are int etc anyone got any ideas if I can do this?

    Read the article

  • BizTalk mapping to excel

    - by rsapru
    Is there a way to convert or get the mapping from BizTalk map to an excel or a text file. From where we can directly see what field is mapped to what filed instead of following the lines. I have an BizTalk map which had around 600 fields mapped. any pointers will be really helpful.

    Read the article

  • Using Entity Framework V4 - Mapping Stored Procedures with XML output

    - by ericwahner
    I have been attempting to implement the Entity framework into my project and unfortunately it seems like mapping an XML result set from SQL is not something that is supported. I also have issues with returning multiple result sets, though I understand that the EFExtensions was created to try to mitigate that issue. Is there a way to take a FOR XML EXPLICIT result from a SQL Stored Procedure and map it using the Entity Framework?

    Read the article

  • Classic ASP and wildcard mapping

    - by user299635
    Hi, We have enabled the wildcard mapping for an existing classic ASP site to handle through aspnet_isapi.dll. Ever since then, the performance of the site has dropped? Does the .asp files get compiled before it served by IIS? Any help is greatly appreciated Jyothish George

    Read the article

  • Empty String API arguments for actionwebservice received as "SOAP::Mapping::Object" instead of ""

    - by user311985
    I've built an API using actionwebservice and when a client calls a method to pass in an empty string (""), it's to_s value is # instead of "". But when the client passes in "hello", it's to_s value is "hello". class UsersApiController < ApiController web_service_api UserApi def create_or_update(arg1) Rails.logger.info arg1.to_s # Displays "#<SOAP::Mapping::Object:0x3a89c08>" if arg1 is an empty string end end

    Read the article

  • FNhibernate, GeneratedBy.HiLo, hibernate_unique_key etc.

    - by csetzkorn
    Hi, I have started using the s#arp architecture which uses FNhibernate and GeneratedBy.HiLo to generate primary keys (there is also table hibernate_unique_key). Apparently, this is recommended practise and I would like to stick with this. Now to my problem. I have used NHibernate and hbm mapping quite a bit and usually used identity columns for my primary keys. This allowed me to seed the database using SQL. Can I do this with the aforementioned setup (hibernate_unique_key table etc.). I need to do this as SQL insert is much more efficient than using NHibernate + C# to seed the db with a million entities. Any feedback would be very much appreciated. Thanks. Christian

    Read the article

  • Inheritance - Could not initialize proxy - no Session.

    - by Ninu
    hello....i'm newbie developer.... i really need help at now... i just get started with Nhibernate thing at .Net... when i learn Inheritance and try it...it makes me confusing...why i get error like this : Initializing[AP.Core.Domain.AccountPayable.APInvoice#API03/04/2010/001]-Could not initialize proxy - no Session. this is my xml : <class xmlns="urn:nhibernate-mapping-2.2" mutable="true" name="AP.Core.Domain.AccountPayable.APAdjustment, AP.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" table="APAdjustment"> <id name="AdjustmentNumber" type="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <column name="AdjustmentNumber" length="17" /> <generator class="assigned" /> </id> <property name="Amount" type="System.Decimal, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <column name="Amount" /> </property> <property name="TransactionDate" type="System.DateTime, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <column name="TransactionDate" /> </property> <many-to-one class="AP.Core.Domain.AccountPayable.APInvoice, AP.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" lazy="proxy" name="PurchaseInvoice"> <column name="PurchaseInvoice_id" not-null="true" /> </many-to-one> <joined-subclass name="AP.Core.Domain.AccountPayable.APCreditAdjustment, AP.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" lazy="true" table="APCreditAdjustment"> <key> <column name="APAdjustment_id" /> </key> </joined-subclass> </class> </hibernate-mapping> and this is inheritance Class : Parent Class -- public class APAdjustment { #region :FIELD private string adjustmentNumber; private decimal amount; private DateTime transactionDate; private APInvoice purchaseInvoice; Child Class -- public class APCreditAdjustment : APAdjustment { public APCreditAdjustment(){ and this my Data access : public IList<APAdjustment> GetByNameAll() { ICriteria criteria = Nhibernatesession.CreateCriteria(typeof(APAdjustment)); return criteria.List<APAdjustment>() ; } My Problem is : when i load data with gridview ...it works...but i change the property to autogenerate="true" ...i missing "PurchaseInvoice" field...and i change to bind manually,and it works..when i edit that gridview ...i get this error... Initializing[AP.Core.Domain.AccountPayable.APInvoice#API03/04/2010/001]-Could not initialize proxy - no Session so then i change my xml ...lazy="no-proxy" ...it still work...but when edit again ...i get error again ..and i do "Comment out the selected lines" to my association "Many-to-one"...i really works it..but that's not i want... CAN ANYBODY HELP ME...??Plizz...:( Note : I almost forget it ,i use fluent hibernate to generate to database.From fluent Hibernate ..i put *.xml file ...so i'm work to xml NHibernate...not fluent hibernate thing...:)

    Read the article

  • List<T>.SelectMany(), Linq and lambda help

    - by jim
    Hi there I have a class. public class MedicalRequest { private int id private IList<MedicalDays> Days private string MedicalUser ... } and another public class MedicalDays { private int id; private DateTime? day private MedicalRequest request ... } I'm using nhibernate to return a list of all the MedicalDays within a time span. I'd like to do something like this to the resulting list //nhibernate query IList<MedicalDays> days = daysDao.FindAll(searchCritCollection); //select a list of days from resulting list IEnumerable<MedicalDays> queriedList = days.SelectMany(i => i.MedicalRequest.MedicalUser == employee); Linq tells me that the type cannot be inferred by the usage. I'd like to know what I'm doing wrong, and if there is a preferred way of doing something like this. Thanks for your time.

    Read the article

  • Query Cache Issues - releasing cache locks?

    - by Corey Coogan
    I have enabled query caching to use the NHibernate.Caches.Prevalence.PrevalenceCacheProvider provider. This is running on IIS 7, WCF service. I have limited rights to what I can do, but I'm getting an exception about releasing cache locks. I've created the following 2 directories in the system32/inetsrv directory and given full control to the account IIS is using. NHibernate.Cache.StandardQueryCache Some other cache dir I can think of right now This doesn't happen in my local environment so I'm thinking this is somehow related to caching. Do I need to give the IIS account full control to the inetsrv dir as well?

    Read the article

  • Setting up nHibernate with an Oracle database and Visual Studio 2010

    - by Geoff
    I'm creating a .ASPNET project and I would like to setup nHibernate as my ORM tool. I will be using an existing oracle database and Visual Studio 2010. ORM tools are very new to me and really could use any advice to better understand the tool and the process required to implement them. I've been following an article at http://nhforge.org/wikis/howtonh/your-first-nhibernate-based-application.aspx to learn about it and am stuck where they say to create a local database as mine only give me the option to create a SQL server database (perhaps this a new for visual studio 2010?). Is the purpose of this database just to cache results from the live database? Thanks for your help! Geoff

    Read the article

  • Problems setting up an ASP.NET MVC site on IIS7 w/ Nhibernate

    - by Brandon
    When deploying my published website to the host (Its a shared hosting plan) I get this error: [NullReferenceException: Object reference not set to an instance of an object.] System.Web.PipelineStepManager.ResumeSteps(Exception error) +929 System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) +91 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +508 I found this question which describes my problem, but I'm not initializing NHibernate in Application_Start, it is already being done in Init. The only other cause of this error I can find is that the Global.asax file is inheriting from a class other than HttpApplication, but I'm not doing that either. This is pretty much the Global.asax file protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RegisterRoutes(RouteTable.Routes); } public override void Init() { base.Init(); if (_wasNHibernateInitialized) return; // Initialize NHibernate // Other setup like the StructureMap initialization } Is there any other reason why an ASP.NET MVC application would give this error when being deployed to IIS7?

    Read the article

  • NHybernate, the Parallel Framework, and SQL Server

    - by andy
    hey guys, we have a loop that: 1.Loops over several thousand xml files. Altogether we're parsing millions of "user" nodes. 2.In each iteration we parse a "user" xml, do custom deserialization 3.finally, in each iteration, we send our object to nhibernate for saving. We use: .SaveOrUpdateAndFlush(user); This is a lengthy process, and we thought it would be a perfect candidate for testing out the .NET 4.0 Parallel libraries. So we wrapped the loop in a: Parallel.ForEach(); After doing this, we start getting "random" Timeout Exceptions from SQL Server, and finally, after leaving it running all night, OutOfMemory unhandled exceptions. I haven't done deep debugging on this yet, but what do you guys think. Is this simply a limitation of SQL Server, or could it be our NHibernate setup, or what? cheers andy

    Read the article

  • How to organize a ASP.NET MVC solution (DDD)

    - by vandalo
    Hello everyone. I am trying to start a new project (asp.net MVC) and I would like to apply some DDD rules I've learned in these last few months. I don't know how to organize my solution though. I would like to use Nhibernate but I don't want to use Fluent Nhibernate cause it must be something like an experiment. I've seen some examples where people keep everything in the same project. Some others tend to create a different project for everything. Do you think I should differentiate the model and the repository or put it in the same project? If someone has some links to articles etc it would be appreciated. thanks Alberto

    Read the article

  • NotSupportedException on IQuery's Enumerable when using statelesssession

    - by user57555
    when trying to use the Enumerable method on a named query, with a Stateless session, as shown in the example at: http://www.nhforge.org/doc/nh/en/#batch-statelesssession i am seeing a NotSupportedException. the stack trace is as below: System.NotSupportedException: Specified method is not supported. at NHibernate.Impl.StatelessSessionImpl.Enumerable(String query, QueryParameters parameters) at NHibernate.Impl.QueryImpl.Enumerable() here is a snippet of my code: IStatelessSession statelessSession = sessionFactory.OpenStatelessSession(); var fileLines = statelessSession.GetNamedQuery("GetLinesByFileId") .SetInt32("FileIdInput", fileId).Enumerable<FileLineEntity>(); the named query, GetLinesByFileId is defined in the hbm as below: <query name="GetLinesByFileId" cacheable="false" read-only="true"> <![CDATA[ from FileLineEntity lineItem where lineItem.FileId=:FileIdInput ]]> </query> any suggestions on what i maybe missing here?

    Read the article

  • Problems using FluentNHibernate + SQLite with .NET4?

    - by stiank81
    I have a WPF application running with VS2010 .Net3.5 using Nhibernate with FluentNHibernate + SQLite, and all works fine. Now I want to change to use .Net4, but this has turned into a more painful experience then I expected.. When setting up the connection a FluentConfigurationException is thrown from FluentConfiguration.BuildConfiguration saying: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more details. The inner exception gives us more information: Could not create the driver from NHibernate.Driver.SQLite20Driver, NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4. It has an InnerException again: Exception has been thrown by the target of an invocation. Which again has an InnerException: The IDbCommand and IDbConnection implementation in the assembly System.Data.SQLite could not be found. Ensure that the assembly System.Data.SQLite is located in the application directory or in the Global Assembly Cache. If the assembly is in the GAC, use element in the application configuration file to specify the full name of the assembly. Now - to me it sounds like it doesn't find System.Data.SQLite.dll, but I can't understand this. Everywhere this is referenced I have "Copy Local", and I have verified that it is in every build folder for projects using SQLite. I have also copied it manually to every Debug folder of the solution - without luck. Notes: This is exactly the same code that worked just fine before I upgraded to .Net4. I did see some x64 x86 mismatch problems earlier, but I have switched to use x86 as the target platform and for all referenced dlls. I have verified that all files in the Debug-folder are x86. I have tried the precompiled Fluent dlls, I have tried compiling myself, and I have compiled my own version of Fluent using .Net4. I see that there are also others that have seen this problem, but I haven't really seen any solution yet. After @devio's answer I tried adding a reference to the SQLite dll. This didn't change anything, but I hope I made it right though.. This is what I added to the root node of the app.config file: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <qualifyAssembly partialName="System.Data.SQLite" fullName="System.Data.SQLite, Version=1.0.60.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" /> </assemblyBinding> </runtime> Anyone out there using Fluent with .Net4 and SQLite successfully? Help! I'm lost...

    Read the article

  • Where should Nhibernate IPostInsertEventListener go in the 3 tier architecture

    - by Quintin Par
    I have a IPostInsertEventListener implementation like public class NHibernateEventListener : IPostInsertEventListener, IPostUpdateEventListener which catches some entity inserts and does an additional insert to another table for ETL. Essentially it requires references to the Nhibernate, Domain entity and Repository<> Now where do I go about adding this class? If I add it to ApplicationServices I’ll end up referencing Nhibernate at that layer. If I add this to the Data layer, I’ll have to reference Domain (circular). How do I go implementing this class with S#arp principles? Any thoughts?

    Read the article

  • Spring.NET. How actively is it being developed/supported?

    - by Bubba88
    I've made my choice for the developement components on the .NET platform: Spring.NET for IoC and NHibernate for data access. But how safe is it? I've heard here on SO (don't remember which post exactly) that Spring.NET is on its way down, cause for example the Java original version is developed by a large number of people; but (they say that) the sole person behind the .NET version is Mr. Mark Pollack. Is that so? And, if so, does it still make sense to count on Spring.NET for my production applications? if you have similar information about NHibernate, I'll appreciate it; though it seems that the latter is actively supported.

    Read the article

  • Anyone know a good mind mapper that works with a scheduler?

    - by GLycan
    TL;DR: Mind mapping tasks to be processed into a schedule based on task metadata. I have all sorts of ideas about what to invest resources (mainly time) in, but when I actually have time to do something I useually end up browsing reddit for not knowing what do to, and the frequancy with which I forget deadlines scares me. I'd love to bring order and structure into my mind, and always know what to do next. So, I want a mind mapping app, where I'd give each branch (types and subtypes of things I want to do) a importance score (if there were two branches, and one had 60 while the other 40, they would respectivily get 60% and 40% of the parent's importance, with the root being 100) and a how soon that branch should be revised/updated (an hobby I want to try out might be checked, say, once a week, while a school subject should be checked once a day) and give each leaf (something I want/need to do) how much time it takes, deadline (if any), and optionally an absolute importance, reoccurrence (guitar practice might repeat once a week), and prerequisites (reading something requires that book (although that could be brought somewhere), coding requires a box, jogging requires being outside) and maybe some other flags, like if it's enjoyable or not. It should either be packaged or working with a schedular app, to which I'd say, look, my day works this way (completely busy from 8 to 9:15, then 15 minutes of being inside with nothing, ..., two hours with box and possibility to go outside, etc), saying that such-and-such pattern is school and happens ever weekday except such-and-such days. The output should be of the form of a schedule, fit for printing or, when I finally get an android, mobile viewing, that schedules tasks with regards to availability of resources and importance (importance being derived from the leaf-task's parent branches), and the set of flags (all work and no play makes me a dull boy). One of these tasks should be reviewing anything that should be updated on that day, including future day layouts (e.g, if the time slots of future days have changed. This should be done every day.) Does anyone know some collection of preferably open-source (or free, or pirateable) tools, or better yet a single one, that accomplishes this task? I know python pretty well, and should be able to write any necessary glue.

    Read the article

  • Access one database from multiple ORMs :: Caching issue

    - by kaptan
    I know this is not a good idea and the best would be to let the applications talk Web Services. But I have a situation where the legacy application is accessing a database with an ORM and I need to access the same database from the new .net application using Fluent nHibernate. So the question is what problems this will make and how to solve them? I guess the main issue is the caching. I need to disable the caching on one of the applications (which would be the new app). So how can I disable caching in nHibernate? Is there anything else that should be careful about?

    Read the article

  • Select columns from join table only without requiring a join

    - by Kent Boogaart
    Given these tables: create table Orders ( Id INT IDENTITY NOT NULL, primary key (Id) ) create table Items ( Id INT IDENTITY NOT NULL, primary key (Id) ) create table OrdersItems ( OrderId INT not null, ItemId INT not null, primary key (OrderId, ItemId) ) Is it possible to use HQL/criteria API to contruct a query that results in the following SQL: SELECT [OrderId], [ItemId] FROM [OrdersItems] I've tried both of these approaches: var hqlResults = session .CreateQuery("select order.id, item.id from Order order inner join order.Items item") .List(); var criteriaResults = session .CreateCriteria<Order>() .CreateAlias("Items", "item", NHibernate.SqlCommand.JoinType.None) .SetProjection(Projections.Property("id"), Projections.Property("item.id")) .List(); But both approaches insist on generating a join (or fail because the join isn't present, in using criteria), resulting in SQL such as: select order.Id, item.Id from Orders order inner join OrdersItems ordersItems on order.Id = ordersItems.ArticleId inner join Items item on ordersItems.CategoryId = item.Id Is there any way to have NHibernate generate a query that selects columns only from the join table, without requiring a join?

    Read the article

  • NHibernate on WCF Dependency Injection

    - by Diego Dias
    Hi, I would like of inject a wrapper of my sessionfactory in my wcf service, but my service is in other server and I want set nhibernate in my site asp.net. I have a interface as: public interface ISessionBuilder { ISession Current{get;}; void Close(); } public class SessionBuilder : ISessionBuilder { static SessionBuilder() { Initialize(); } public ISession Current{ get; private set; } public void Close() { //aqui eu fecho a session } private static void Initialize() { //aqui eu configuro o NHibernate } } I want to be able of set SessionBuilder in the site asp.net and inject this implementation in my wcf Service where I have my repositories which will consume SessionBuilder to query my database. Anyone have some sugestion?

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >