orm

Hibernate: Transitive persistance of set of objects in an @ManyToMany relationship

I am trying to map the following: public class Person{ ... @ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }) @JoinTable(name = "person_categories", joinColumns = @JoinColumn(name = "personId"), inverseJoinColumns = @JoinColumn(name = "categoryId")) private Set<Category> categories ... } public class Category ...

Is there a recommend way to get Spring 2.5+ to autowire Hibernate domain objects

Is there a recommend way to get Spring 2.5+ to autowire Hibernate (3.0+) domain objects. I realize that there is a way to do this using AspectJ (@Configurable), but I would like to avoid pulling in AspectJ. Some Googling found this DependencyInjectionInterceptorFactoryBean class but it seems to just live in the sandbox (and just in 2.0....

Can LINQ-To-SQL be used Asynchronously?

Can LINQ-To-SQL be used Asynchronously? Are there any OR Mappers that allow Asynchronous operations? CLOSED: See http://stackoverflow.com/questions/252355/how-to-write-asynchronous-linq-query ...

Using an ORM or plain SQL?

For some of the apps I've developed (then proceeded to forget about), I've been writing plain SQL, primarily for MySQL. Though I have used ORMs in python like SQLAlchemy, I didn't stick with them for long. Usually it was either the documentation or complexity (from my point of view) holding me back. I see it like this: use an ORM for ...

ORM or something to handle SQL tables with an order column efficiently

Hi, I got an Java application using SQL tables that contains an ordered list of entities, ordered by an order column. I would like to add/remove things in/from the middle of the list. Now, I'm wondering if some persistence framework / orm / you-name-it could provide this kind of functionality with batch update of order column. At the...

Opinions on Alachisoft TierDeveloper O/R mapper

I was looking for Object Relational Mappers on Google and found this ORM (TierDeveloper O/R mapper). Has someone tried it? What were your experiences with it? Is it easier to use than other ORMs? ...

Does the Rails ORM limit the ability to perform aggregations?

I am concerned whether Rails can handle the types of complex aggregations that are needed for a financial application and particularly whether the ORM can handle these effectively. In a financial application that I am thinking of using this for, there is a need to do lots of reporting of detailed financial data, aggregated in various way...

Telerik OpenAccess

Has anyone used this ORM? link Critiques/Praise? I work in an office that is heavily invested in other telerik venues and I would like to know more about their newest product and whether or not it should be avoided. ...

Using relations for setting in Zend_Db_Table_Row

Hi there is there a way how to use Zend_Db relations for setting related objects? I am looking for something like following code: $contentModel = new Content(); $categoryModel = new Category(); $category = $categoryModel->createRow(); $category->setName('Name Category 4'); $content = $contentModel->createRow(); $content->setTitle(...

What is the correct implementation for GetHashCode() for entity classes?

Below is a sample implementation of overriding Object.Equals() for an entity base class from which all other entities in an application derive. All entity classes have the property Id, which is a nullable int. (It's the primary key of whatever table the entity class corresponds to.) public override bool Equals(object obj) { ...

Interesting API Design/Pattern Question

I am re-designing part of our internal ORM tool, and I want to expose Field (a class that represents a field in the database, like CustomerFirstName) directly to the end-developer. So that was easy enough to accomplish, however the API got a little ugly because this Field class was previously used internally and is too open. For instanc...

What's your opinion of Castle ActiveRecord?

I need a .Net ORM, and I heard some good things about this. I've had NHibernate running in the past, but this seems to make a lot of things easier. However, two things made me a little nervous. It uses NHibernate 1.2, which seems old It's still an RC with its last release 18 months ago Is anyone using it, and do they recommend it f...

How do you manage your ORM layer when database undergoes changes ?

I understand the reason behind not auto refreshing your .dbml (Linq2Sql), .edmx (Linq2Entities) or .hbm.xml (NHibernate). In each of these ORM solutions you need to update these files if you have changes in the database. Is there a way to refresh these files automatically if you are 100% sure that it wont break anything? I am reasonably...

DataBinding to reference types

I've got some classes that have properties like this, and they work perfectly because they are very normal: Public Overridable Property CustomerLastName() As String Get Return m_CustomerLastName.Value End Get Set(ByVal Value As String) m_CustomerLastName.Value = Value End Set ...

What should be considered using subselects in queries with haevy loaded databases?

We are developing an application with a persistence layer using OpenJPA1.1 and an Oracle DB as backend storage. I will use queries with subselects (see my question at Solving JPA query finding the last entry in connected list). Now my colleagues at work remark, that such queries can lead to performance problems as the database is fille...

Map classes to database with ado.net

Hey there, I want to know if there is way to create a database out of existing classes with the ado.net entity framework or to map existing classes to a database. I looked for tutorials and only found ways to create the classes with the entity model designer. As an example I have the class Bird with Properties Length and Age On the...

Hibernate vs JPA vs JDO - pros and cons of each?

I'm familiar with ORM as a concept, and I've even used nHibernate several years ago for a .NET project; however, I haven't kept up with the topic of ORM in Java and haven't had a chance to use any of these tools. But, now I may have the chance to begin to use some ORM tools for one of our applications, in an attempt to move away from a ...

[PHP] ORM Query results: Arrays vs Result handle wrapped in Iterator interface

Okay, here's one for the pro's: For a couple of years now, i've been working on my own PHP ORM/ActiveRecord implementation that i named Pork.dbObject. It's loosly based on the 'make your own site with rails in 5 minutes' movie we all saw a couple of years ago. You can do things like: $clients = dbObject::Search("Client", array("ID > 5...

How to store an object instance as a field of an EJB3 entity?

I have an entity Promotion, which has 3 simple fields (id, name, description) and all 3 will be mapped to DB. So far so good. Problem is with the 4th field, ruleModel, which is an instance of RuleModel and when constructed at runtime, it will contain object instances of a dozen other classes. I don't want to map RuleModel to a DB table, ...

Python libraries to construct classes from a relational database? (ORM in reverse)

Are there any Python object-relational mapping libraries that, given a database schema, can generate a set of Python classes? I know that the major libraries such as SQLObject, SQLAlchemy, and Django's internal SQL ORM library do a very good job of creating a DB schema given a set of classes, but I'm looking for a library that works in r...