orm

NHibernate or FluentNHibernate or ActiveRecord?

I am in a stage of mapping my CSharp classes into database tables. I have decided to use NHibernate as my ORM tool after comparing with other tools. I have never done a real project with NHibernate before and now am considering alternatives for the mapping, ActiveRecord: according to the project's web site, using ActiveRecord can boost...

How to choose an object relational mapping for .net

(This must be a FAQ, so I expect it to be closed as duplicate, however I can not find a question that contains a good overview of the issues etc.) What should someone consider when choosing an ORM for a .net system? How are the above addressed by the ORM that are in common usage for .net systems. (Witch stack overflow question should ...

In LinqToSql how do you enable change tracking on an entity's custom property?

For other reasons, i've had to create my own property in an Entity in the ORM, which has is a type of another entity (had issues with associations so did it this way instead). The problem is that whenever I make a change to that property, it isn't being flagged as a change so I cannot call SubmitChanges on it. So basically my question ...

SubSonic vs. Castle ActiveRecord

For an upcoming project C# code needs to be written around a legacy Oracle database. It will be very data centric, because most of the code will deal with data manipulation -- there are almost no business rules. So I decided against a full blown ORM and opted for an Active Record approach. I come across two options: SubSonic and Castle ...

Hibernate lost reference after calling save. Do you know why ?

Hi, Take a look at the following classes (UNIdirectional @OneToMany) @Entity public class Team { private Integer id = -1; @Id @GeneratedValue public Integer getId() { return this.id; } private List<Player> playerList; @OneToMany @Cascade(CascadeType.SAVE_UPDATE) @JoinColumn(name="TEAM_ID...

Designing DATA Access Layer in ASP.NET 3.5 app

I need to decide about the DATA Access Layer of a medium sized web application to be run on the intranet of a company. I've worked with CodeSmith before and found it useful but it consumes lot of development time if the underlying database schema changes, so would like to do away with it and try my hands with some new DAL which would hel...

updating "nested" objects with JDO on Google App Engine

I'm having trouble figuring out the proper way to update "nested" data using Google App Engine and JDO. I have a RecipeJDO and an IngredientJDO. I want to be able to completely replace the ingredients in a given recipe instance with a new list of ingredients. Then, when that recipe is (re)persisted, any previously attached ingredients...

In symfony/doctrine's schema.yml, where should I put onDelete: CASCADE for a many-to-many relationship?

I have a many-to-many relationship defined in my Symfony (using doctrine) project between Orders and Upgrades (an Order can be associated with zero or more Upgrades, and an Upgrade can apply to zero or more Orders). # schema.yml Order: columns: order_id: {...} relations: Upgrades: class: Upgrade local: order_id ...

How do I join tables on non-primary key columns in secondary tables?

I have a situation where I need to join tables on an object in an ORM class hierarchy where the join column is NOT the primary key of the base class. Here is an example of the table design: CREATE TABLE APP.FOO ( FOO_ID INTEGER NOT NULL, TYPE_ID INTEGER NOT NULL, PRIMARY KEY( FOO_ID ) ) CREATE TABLE APP.BAR ( FOO_ID IN...

Django ORM: Chaining aggregated querysets into one

Can I chain these two querysets into one? qs1 = OrderTicket.objects.filter(date__gt=datetime.date(2009, 1, 1), date__lt=datetime.date(2009, 1, 30)).values('order_type').annotate(value_1 = Sum('gbp_value')).order_by('order_type'), qs2 = OrderTicket.objects.filter(date__gt=datetime.date(2009, 2, 1), date__lt=datetime.date(2009, 2, 30)).va...

What's the actual convenience that ORM brings ?

Possible Duplicate: Why should you use an ORM? Can someone provide a simple explanation to prove ORM is worth it? EDIT as for duplicate issue,I want the answer to be with some code demo to illustrate. ...

.net Active Record ORM with full migration support

I'm looking for a .net OR/M that uses the Active Record pattern and allows the developer to define migrations that will update the database scheme in code. I have seen ActiveRecord over at http://www.castleproject.org/activerecord/index.html - but it is poorly documented (with terribly out of date samples) and there is no production read...

ORM (esp. NHibernate) performance for complex queries

Hi, My company is in the process of rewriting an existing application from scratch. This application, among other tasks, performs complex SQL queries against order and invoice data to produce sales reports. The queries are built dynamically depending on which criteria are selected by the user, so they can be pretty complex if many crite...

Doctrine ORM: Models not respecting case

I have a mysql database table called UserDegree, when i try to import back to PHP using Doctrine it generates a model name Userdegree, is there a way to solve this? i really can't find any good doctrine documentation. thanks! ...

Dynamic structure of db and orm?

For example, I have common.dll and plugin.dll. Plugin should have possibility to add any tables to db and than use it with maybe references to tables that common created. What ORM is better for such case? To use objects in referenced dll, with own. Is this possible somehow with EF or L2S? ...

What does Hibernate/Toplink offer above JPA?

As far as I know, JPA itself offers all the shiny features like ORM, JPQL, entity relations mapping and so on. But I don't really understand, why do people use Hibernate or Toplink on top of JPA. What does Hibernate offer that JPA itself doesn't have? ...

Mapping nested components in Fluent NHibernate

Hi all, I have a 'User' Entity that contains an 'Address' Value Object. I have this mapping ok using FNH's Component concept. However, the Address VO also contains a Country which is another value object. I had assumed that this should be just nested as another component, but this doesn't seem to work. Can anyone tell me how I shoul...

Is there a way to ensure one object reference per record in an ActiveRecord hierarchy?

It seems when I grab some hierarchical ActiveRecord structure that there are quite a few hits to the database. I improved this using the :include option to flesh out as much of the structure as possible. Even so, it seems that ActiveRecord does not map the reciprocal sides of a relationship (e.g. parent-child) with unique references to...

Is there an ORM tool for C# that can 'black box' the database?

I have a bunch of POCO's that I created that I want to create a persistent layer for. Thing is, I really don't care how the data is stored in SQL Server, I just want it to be stored. In other words, I want to tell the ORM tool, "Here's some POCO classes, save them." and not have to do anything beyond that. Is there any ORM tool for C# th...

Why doesn't the JPA spec (including 2.0) or Hibernate extension allow u to specify a generator e.g. Oracle sequence for the @Version annotation

I think the preamble of my use case cluttered my actual point, so I am restating more succinctly: Why can't @Version take a generator and allow me to assign a sequence to it like I can do for @Id; something like this @Entity @javax.persistence.SequenceGenerator( name="SEQ_STORE", sequenceName="my_sequence" ) public class Store i...