orm

What is the best way to improve performance of NHibernate?

I have an application that uses NHibernate as its ORM and sometimes it experiences performance issues due to how the data is being accessed by it. What kind of things can be done to improve the performance of NHibernate? (Please limit to one recommendation per answer) ...

When choosing an ORM, is LINQ to SQL or LINQ to Entities better than NHibernate?

I find I can do more with NHibernate, and even Castle than with the Linq to Entities, or linq to SQL. Am I crazy? ...

Multijoin queries in Django

What's the best and/or fastest method of doing multijoin queries in Django using the ORM and QuerySet API? ...

Good ORM for C++ solutions?

Does anyone have a good recommendation for an ORM (Object Relational Mapper) for C++? Our technology stack is: IDE/C-Compiler = Borland C++ Builder so ideally something that is known to compile with BCC. We use PostgreSQL as our database and developed our own database abstraction layer using common API to many driver type interface. S...

JPA Multiple Transaction Managers

i have one applicationContext.xml file, and it has two org.springframework.orm.jpa.JpaTransactionManager (each with its own persistence unit, different databases) configured in a Spring middleware custom application. i want to use annotation based transactions (@Transactional), to not mess around with TransactionStatus commit, save, and ...

Code generators vs. ORMs vs. Stored Procedures

In what domains do each of these software architectures shine or fail? Which key requirements would prompt you to choose one over the other? Please assume that you have developers available who can do good object oriented code as well as good database development. Also, please avoid holy wars :) all three technologies have pros and co...

iBATIS for Python?

At my current gig, we use iBATIS through Java to CRUD our databases. I like the abstract qualities of the tool, especially when working with legacy databases, as it doesn't impose its own syntax on you. I'm looking for a Python analogue to this library, since the website only has Java/.NET/Ruby versions available. I don't want to have...

Poll: ASP.Net Data Access Methodologies

With .Net 3.5 SP1 adding Entity Data Model as an option for data access we are now faced with several out of the box options; EDM, LINQ-to-SQL, Typed Datasets, pure ADO.Net. We also have several open source options; Subsonic, NHibernate, LLBLGen. So the question for the poll: What is your single favorite Data Access Methodology for AS...

When using an ORM, how to safely send loaded entities across the tiers

When a system has N tiers, and when using an ORM, how do you send loaded entities across the tiers ? Do you use DTO ? When DTO are not used and the entities are directly sent, how do you protect againt the uninitialized lazy loaded relationship errors ? Note : this is not a "should N tiers be used ?" question. I assume that the system...

Entity Framework - Can you map the result type of an imported stored procedure to a custom entity type?

I already have an entity model in a separate dll that contains various objects that I need to use. I don't really want to create or duplicate entities using the EF designer. Instead I would like to configure it so that when I call a stored procedure it will map certain columns to specific properties. I know you can do something VERY clo...

Lightweight alternatives to NHibernate

NHibernate is not really a good fit for our environment due to all the dependencies. (Castle, log4net etc.) Is there a good lightweight alternative? Support for simple file based databases such as Access/SQLite/VistaDB is essential. Ideally, something contained in a single assembly that only references .NET assemblies. If it only requ...

What is the n+1 selects problem?

The problem is often mentioned in O/R-mapping discussions, and I understand that it has something do to with having to make a lot of database queries for something that seems simple in the object world. Does anybody have a more detailed (but simple!) explanation of the problem? ...

Which EJB 3 persisent provider should I use?

I are using EJB 3 on a fairly large J2EE project, by default with Netbeans sets the persistent provider for the entity beans to TopLink. There is the option to change the provider to one of the following or even add a new persistence library: Hibernate KODO OpenJPA Which persistence provider do you prefer to use? What are the benefit...

Are there any ORM tools for Haskell?

What is the best way to interact with a database using Haskell? I'm accustomed to using some sort of ORM (Django's ORM, hibernate, etc.) and something similar would be nice when creating apps with HAppS. Edit: I'd like to be free to choose from Postgresql MySql and SQLite as far as the actual databases go. ...

Good PHP ORM Library?

Does anyone know of a good object-relational-mapping library for PHP? I know of PDO/ADO, but they seem to only provide abstraction of differences between database vendors not an actual mapping between the domain model and the relational model. I'm looking for a PHP library that functions similarly to the way Hibernate does for Java/.Net....

What are best practices to implement security when using NHibernate?

Traditionalist argue that stored procedures provide better security than if you use a Object Relational Mapping (ORM) framework such as NHibernate. To counter that argument what are some approaches that can be used with NHibernate to ensure that proper security is in place (for example, preventing sql injection, etc.)? (Please provide...

Good .NET ORM Framework that supports OleDb and Stored Procedures?

A typical stored procedure in our system accepts around 20 or so parameters. There's no chance of refactoring these stored procedures either. I've basically resorted to writing my own code generator that wraps these SP's into (database provider agnostic) "Command" objects, with their public properties corresponding to the SP parameters...

Architecture for a business objects / database access layer

For various reasons, we are writing a new business objects/data storage library. One of the requirements of this layer is to separate the logic of the business rules, and the actual data storage layer. It is possible to have multiple data storage layers that implement access to the same object - for example, a main "database" data stor...

When to use Hibernate/JPA/Toplink?

Right now I'm making an extremely simple website- about 5 pages. Question is if it's overkill and worth the time to integrate some sort of database mapping solution or if it would be better to just use plain old JNDI. I'll have maybe a dozen things I need to read/write from the database. I guess I have a basic understanding of these tech...

ORM: Handwritten schema or auto-generated?

Should I use a hand-written schema for my projected developed in a high-level language (such as Python, Ruby) or should I let my ORM solution auto-generate it? Eventually I will need to migrate without destroying all the data. It's okay to be tied to a specific RDBMS but it would be nice if features such as constraints and procedures cou...