orm

In NHibernate, can I use factory to build complex aggregate object (Entity)?

In NHibernate, can I use factory to build complex aggregate object (Entity)? If yes then how? If not.. then what is your approach? ...

Where do you put SQL Statements in your c# projects?

I will likely be responsible for porting a vb6 application to c#. This application is a windows app that interacts with an access db. The data access is encapsulated in basic business objects. One class for one table basically. The existing vb6 business objects read and write to the DB via DAO. I have written DALs and ORMs a few times be...

Using only the DB part of Django

Does somebody know how "modular" is Django? Can I use just the ORM part, to get classes that map to DB tables and know how to read/write from these tables? If not, what would you recommend as "the Python equivalent of Hibernate"? ...

Python ORM that auto-generates/updates tables and uses SQLite?

I am doing some prototyping for a new desktop app i am writing in Python, and i want to use SQLite and an ORM to store data. My question is, are there any ORM libraries that support auto-generating/updating the database schema and work with SQLite? ...

ORM Adoption in Enterprise Solution?

I have the feeling that ORM is more established and better accepted in the realm of common websites than in Enterprise setting such as banking, or B2B commerce sites. Is my impression correct? If yes, any reason why this is so? ...

Where is the line between DAL and ORM?

The terms are often thrown around interchangeably, and there's clearly considerable overlap, but just as often it seems implied that people see something strongly implied by saying that a system is an ORM that isn't implied by it being a DAL. What is that? What, if any, are the key points that differentiate these types of system? For ...

NHibernate: Audit logging using Interceptor or Triggers?

Triggers seems like a simple solution for Audit logging. Why should I use Interceptors? Database portability is one con of trigger... what are others? ...

Is Codesmith a viable ORM tool (or should I stick with a true ORM)

I'm shopping for an ORM tool. I'm agonizing over the purchase of either CodeSmith (which is currently available at a substantial discount) versus an ORM tool. LINQ to SQL is off my list; SubSonic 2.x is off the list (I don't want to invest in that dead end knowing that SubSonic 3.0 is coming. NHibernate seems like overkill as does LLBL...

EJB3 and manual hierarchy persistence.

I have a legacy database, which I am using EJB3 to model. The database is in quite a poor shape, and we have certain unusual restrictions on how we insert into the DB. Now I want to model the database in a hierarchy that fits in with the DB strucuture, but I want to be able to manually insert each entity individually without the persiste...

Object/Relational mapping

In our java project, We decided to use ORM object/relational mapping technique in objects' persisting. But we hesitate to use a specific framework to do this.So, what is the best framework for java can do this task? ...

NHibernate and string primary keys

We have a legacy database that uses strings as primary keys. I want to implement objects on top of that legacy database to better implement some business logic and provide more functionality to the user. I have read in places that using strings for primary keys on tables is bad. I'm wondering why this is? Is it because of the case-se...

Any reasons not to use SQLObject over SQLAlchemy?

I don't expect to need much more than basic CRUD type functionality. I know that SQLAlchemy is more flexible, but the syntax etc of sqlobject just seem to be a bit easier to get up and going with. ...

JPA: please help understanding "join fetch"

I have the following entity structure: Business --> Campaign --> Promotion, where ONE Business can have MANY Campaigns and ONE Campaign can have MANY Promotions. Both one-to-many relations are declared as LAZY. One place in my code, I need to eagerly fetch both collections from a Business, so I do: Query query = entityManager.create...

Are there any statistics on ORM usage / popularity?

I'm looking for some statistics on the usage/popularity/availability/etc of object relational mapping frameworks (ORMs). An example might be how the number of downloads of a specific ORM has changed over time. Does anyone know of any such statistics? Edit: A little clarification: The reason I want the statistics is to be able to back ...

Hibernate Annotations - Which is better, field or property access?

This question is somewhat related to http://stackoverflow.com/questions/305880/hibernate-annotation-placement-question. But I want to know which is better? Access via properties or access via fields? What are the advantages and disadvantages of each? ...

ORM Inheritance

Has anyone really wanted and used inheritance support on ORM tools, and if yes which one do you think offers the best support? Or is ORM Inheritance a "pie in the sky" concept? ...

ORM Support for Handling Deadlocks

Do you know of any ORM tool that offers deadlock recovery? I know deadlocks are a bad thing but sometimes any system will suffer from it given the right amount of load. In Sql Server, the deadlock message says "Rerun the transaction" so I would suspect that rerunning a deadlock statement is a desirable feature on ORM's. ...

Map inheritance from generic class in Linq To SQL

Hi everyone, I'm trying to map my inheritance hierarchy to DB using Linq to SQL: Inheritance is like this, classes are POCO, without any LINQ to SQL attributes: public interface IStage { ... } public abstract class SimpleStage<T> : IStage where T : Process { ... } public class ConcreteStage : SimpleStage<ConcreteProcess> { ... } He...

How would an ORM framework in PHP be structured?

I want to build a small ORM (Object Relational Mapping) framework in PHP. I want to do a mixture of an MVC approach, with the same controller/method/variable approach used by CodeIgniter. There are a few frameworks out there already which do this, but things like Form validation Pagination CRUD And AJAX are very difficult to do in t...

With a DAO pattern, do you ever expose the EntityManager or Session as a parameter?

Is there ever a case in a standard webapp where one would pass an EntityManager or Session as a parameter to a DAO call, i.e. findPersonByName(String name, Session session)? Or should the the opening and closing of the session be abstracted in the implementation? ...