orm

one-to-many JPA annotations won't delete orphans

Hello good people. I 'm trying to build a user and a contact management project. i have a lot of classes so will limit it to what are in concern here. i have a userAccount, userProfile, and group here is the UserAccount Mapping @Id @GeneratedValue @Column(name="USER_ACCOUNT_ID") private Long ID; ...... @Column(name="EMAIL", length=10...

Which is beneficial for start up; Linq to SQL or Nhibernate?

I want to learn ORM and I wonder which is beneficial for start up; Linq to SQL or Nhibernate. considering time,adaptation... etc ...

Dynamic variables in Django base.html

I have an app that uses flatpages and other constructs that don't take a request object. This causes problems in base.html. Here's a simple example. If I wanted something like "Welcome {{ request.user.username }}!" at the top of every page, what's the best way to make that happen? ...

Connecting to MSSQL using Hibernate

How to connect to the MSSQL database by using Hibernate in Netbeans 6.7.1? Please advice. The dialect is disabled for me. ...

Should we use the same business classes on server and client?

Imagine you have business domain model on server application and you are going to develop rich client application. You can use DTO to transfer data to client and changes to server or use WCF services and generate new classes on the client. Another way is to transfer the same objects as you use on server in your business logic layer. T...

Is there an ORM framework for Cocoa, or a framework that accomplishes a similar goal using a different technique?

I'm developing an application that needs to store lots of records in an organized way. Specifically, I'm writing a personal finance app. As you can imagine, this app will contain records of financial transactions that must be sorted in various ways: by date, by amounts, by recipient, by account, etc. And of course, the app will need to q...

How can I use hibernate with MS Access?

I want to use hibernate with MS Access. Which dialect should I use and can you give me a sample hibernate configuration file with MS Access? ...

Choosing data access methods in ASP.NET MVC

As I am a beginner to ASP.NET MVC, I would like to know what are the best data access methods for ASP.NET MVC? ...

Is it possible to modify methods of an object instance using reflection

What I'm trying to do is create a domain model with a Plain Old PHP Object. The I'm creating a library which will do all the infrastructure stuff. So one of my models looks like this class Project { public $id; public $name; public $typeId; private $type; public function getType() { return $this->type; } public func...

Persisting to SQL Server 2008 using stored procedures, JPA and Hibernate

We are implementing a web page to maintain an organisational structure. The structure is stored in SQL Server 2008 and uses the new HierarchyID data type. Because we have had problems getting JPA and Hibernate to play with this new data type we have decided to use views and stored procedures to abstract away this data type. So we want to...

How to model parent to child pair in MySQL (SQL)

I have a data model that includes element types Stage, Actor, and Form. Logically, Stages can be assigned pairs of ( Form <---> Actor ) which can be duplicated many times (i.e. same person and same form added to the same stage at a later date/time). Right now I am modeling this with these tables: Stage Form Actor Form_Actor ______...

Recommendations for a ERM, DMD and ORM Diagram Creation Application for OSX

I need to produce several ERM, DMD and ORM diagrams for several projects I am working on. Obviously I'd like them to be a sleek and professional as possible, and while a simple Google search provides a plethora of options, they're all pay-for-use. Are there any free (or open source) diagram creators available for Mac OSX which produce ...

Select statement with SqlAlchemy

Yes, very basic question. I've successfully created my db using declarative_base, and can perform inserts into the db too. I just have a few questions about SqlAlchemy sql statements. I've create a table called Location. A few issues/questions (see code below): For statement, "print row", I have to specify each column name that I wa...

How to store word compositions in a relational database in a normalized way?

I'm trying to find a nice way to store word compositions of the following form: exhaustcleaningsystem exhaust cleaning system exhaustcleaning system exhaust cleaningsystem The combinations are given by a default per case. Every word in a composition is stored as a unique row in table 'labels'. labels id value --------------------...

Django ORM, aggregation?

Not sure how to phrase question, but here goes. Say i have a table of events, and each event links to a object using a generic foreign key. I dont want to show two events that link to the same foreign object, only the most recent event out of those which link to the same object. Can anyone give any hints? ...

NHibernate update reference

Entities We have an entity called Product which is loaded using NHibernate. Product has a category which NHibernate happily populates for me. Database In the database, Product has a foreign key for category. Scenario User edits this Product (via a web interface) and chooses a different category (say instead of "Fish" we select "Veg...

Where are the NHibernate/Hibernate HQL and ICriteria query examples?

I'm still quite new to NHibernate and most of it I'm getting to grips with. One area that I'm really lacking a proper understanding of though is querying (at least when it comes to anything reasonably complex). I learn best by example, but I feel that I haven't really been able to find all that many in depth querying examples on the we...

similarity and difference between jpa and hibernate.

what is similarity and difference between jpa and hibernate. ...

Hibernate Cross Reference many-to-many Parent/Child Mapping Of Same Class

I'm having a major problem getting a parent/child relationship working for a hierarchy of a single class. Basically I have to represent a server tree like thus: Server A Server B Server C Server D Server E Server C Server D Server F Server G Note that the children of Servers B & E are th...

Testing Data Model in project that uses NHibernate for persistence

I'm still new with NHibernate, so correct me if I'm wrong on any of this. When you are using NHibernate to build collections of objects from database records, NH takes care of instantiating your collections and populating them. How do you instantiate your ISet collections when you are writing tests that don't actually use NH? ...