orm

Looking for Great Example Java Application in MVC or MVP

I'm going to be delivering a presentation to my company regarding MVC, MVP and MVVM patterns, test-driven development, and ORM solutions. I'm a .Net programmer and have found the NerdDinner application to be a nice example app to illustrate MVC, TDD and ORM. Is there a good example app in the Java world to demonstrate MVC or MVP with J...

O/R Mappers - Good or bad

I am really torn right now between using O/R mappers or just sticking to traditional data access. For some reason, every time I bring up O/R mappers, fellow developers cringe and speak about performance issues or how they're just bad in general. What am I missing here? I'm looking at LINQ to SQL and Microsoft Entity Framework. Is ther...

Examples of ORMs which use a single table for the entire hierarchy and those which don't ?

From http://blogs.tedneward.com/2006/06/26/The+Vietnam+Of+Computer+Science.aspx "developers typically adopt one of the other two approaches, more complex in outlook but more efficient when dealing with relational storage: they either create a table per concrete (most-derived) class, preferring to adopt denormalization and its costs, or ...

Sorting records in a 1:n (one-to-many) relationship

I've got 2 tables: +-----------+ +------------------------------------+--------------+ + persons | | photos | +-----------| +---------------------------------------------------+ + id | name + | id | person_id | path | title | +-----------+ +---------------------------...

How do I know if an ORM save() method generated an update or an insert query?

The problem: PHP Code (no framework) if ($this->uid) { $query = sprintf('UPDATE %sUSER SET USERNAME = "%s", ' . 'PASSWORD = "%s", EMAIL_ADDR = "%s", IS_ACTIVE = %d ' . 'WHERE USER_ID = %d', DB_TBL_PREFIX, mysql_real_escape_string($this->username, $GLOBA...

Is Implementing a HTTP, XML based CRUD Layer a good idea?

I'm making a CRUD "layer" for an application. This will be a simple CRUD application that, for example, stores User information, Favorite links etc. and not do operations on "fact-type" data. It's actually only to store things like Users, Permissions, Rules, Policies etc. that other parts of the application pick up to perform work. Over...

How do predicate parameters work syntactically in C# ?

Some Object Relational Mapping (ORM) frameworks (such as LLBLGen) allow you to specify "predicate" parameters to the query methods, such as (simplified a bit): var entities = adapter.FetchEntities(EntityType.Employee, EmployeeFields.Salary > 50000); How does that 2nd parameter work syntactically in C#? It kind of looks like a lam...

DotNet Oracle ORM

Hi, What would be a good ORM for Oracle in .NET? I am looking for something that can auto generate the classes and mapping etc. and is free. Something closer to Linq2Sql or SubSonic. ...

comparison between hibernate and cayenne

Someone please help me in choosing whether to use hibernate or cayenne in the comparison between the two in terms of how they handle large databases. That is which is more suitable to handle large databases. Thanks ...

Hibernate WrongClassException / Sets / Discriminators?

Hi, The problem looks like this: A Product table. 3 joined-subclasses: DVD, CD, Book. A Role table (composite id: NAME, ROLE, PRODUCT), and subclasses by discriminator column ROLE: actor, director, artist, author, etc.. which are mapped to Actor, Director, Artist, Author java classes; (pretty usual I guess) ... A Book has authors, a C...

Advantages and Disadvantages of NHibernate

What are the advantages/disadvantages of using NHibernate ? What kind of applications should be (& should not be) built using NHibernate ? ...

Enumerations in the database and O/RM

Suppose I want entries in the table Regions to have a type, e.g. a city, a country etc. What's the accepted way of storing this type, assuming I'll be using O/RM (NHibernate in my case) ? I see two options: Have an enum in the C# bussines layer with the types and store the type as a tinyint in the table. Have a lookup table RegionType...

What is an ORM and where can I learn more about it?

Someone suggested I use an ORM for a project I'm designing but I'm having trouble finding information on what it is or how it works. Can anyone give me a brief explanation or a link as to where I can learn more about it? ...

Primary Keys in Oracle and SQL Server

What's the best practice for handling primary keys using an ORM over Oracle or SQL Server? Oracle - Should I use a sequence and a trigger or let the ORM handle this? Or is there some other way ? SQL Server - Should I use the identifier data type or somehow else ? ...

Coldfusion ORM EntityLoad

When I call EntityLoad does it load ALL the data in the table or just sets up a reference or something, because say if i do this: <cfset test = EntityLoad("Table") /> and then do: ArrayLen(test) I get the number of rows in the database. If its doing that then it should be loading all the data, and that is really inefficent, say I h...

Fluent Nhibernate, stuggling with one-to-many relationships

Okay so I have two tables: Companies | id int | name varchar(50) and Contacts | id int | name varchar(50) | companyID int In my code I have the following classes public class Company { public int Identity { get; set; } public string Name { get; set; } public IList<Contact> Contacts { get; set; } } ...

Entity Framework success stories?

So like many developers before me, I am at the crossroads of choosing an ORM to learn thoroughly and move forward with for future projects. I have been playing with Entity Framework and so far like what I see, although I have only tried simple things, CRUD with clearly defined table relationships with a 1-1 table-entity mapping. I did so...

How can we reduce the unnecessary loading of objects?

In hibernate as well as simple ORM strategy,i am normally loading all the values for the objects.Is there any way to avoid this. Due to this my app running slowly.. ...

Django ORM Query

If there are models as below: class Donation(models.Model): user = FKey(User) project = FKey(Project) ... class Campaign(models.Model): user = Fkey(User) project = FKey(Project) ... class Project(models.Model) ... What is the simplest django ORM query to find a list of all projects that a give...

Using Doctrine with Domain Driven Design

I'm thinking of implementing a Domain Driven Design approach (similar to the one described here), but want to integrate it with the Doctrine ORM. Has anyone had any success doing anything like this? My initial instinct was to use Doctrine as the DAO layer, but it seems a a bit convoluted for Doctrine to map my database fields, and my en...