Hi everyone!
I'm using an ORM (SQLAlchemy, but my question is quite implementation-agnostic) to model a many-to-many relationship between a parent class and its children.. I was wondering, what would be a simple way to express the concept "one of the children is the default/main one"?
For example, I'd need to persist the following:
Th...
Ayende has a blog post detailing how to combat the "n+1" problem in nHibernate. In essence, the problem is this:
Assume you have two tables, "BlogPosts" and "Comments" with a one-to-many relationship between them (i.e. each BlogPost can have multiple Comments). Now, let's say you want to execute the following nested for loop:
foreach...
Is there a general consensus on how to use SQL 2005's full text search with SubSonic? I know that I can use the InlineQuery and get an IDataReader, but is this the only way to do this? Also, how would I incorporate paging into it? Would I have to write the paging myself in the InlineQuery?
What I would really like to do is something ...
I'm about to build my first Ruby on Rails application (and first anything beyond xhtml and css), and I'm looking for some helpful feedback on my model structure.
I've included a mockup to help visual the application.
The only models I'm sure I need so far are:
1. a movie model (to serve as the main model, named movie so URL's will look...
Just dipping my toes into Linq2sql project after years of rolling my own SQL Server DB access routines.
Before I spend too much time figuring out how to make linq2sql behave like my custom code used to, I want to check to make sure that it isn't already "built" in behavior that I can just use by setting up the relationships right in the...
Have you used the OpenAccess ORM from Telerik? How does it compare to NHibernate? When should I consider using it over NHibernate?
...
I'm writing a program to manage orders and then print them.
An order is an object containing the ordering person, the date and the products this person orders. I'd like to add the amount of a certain product one orderer. E.g. 3 eggs, 2 breads.
Is there a simpler way doing this with storm (the ORM I'm using) than splitting the order int...
Are there O/R mapping tools for ASP (not ASP.NET) and are these useful in ASP?
Lieven Cardoen
...
I have the following JPA entity classes (example case). A House belongs on a single Street. A Street has many Houses.
@Entity
public class House {
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
public Integer id;
public String name
@ManyToOne
public Street street;
}
@Entity
public class Street {
...
So recently on a project I'm working on, we've been struggling to keep a solution's code base and the associated database schema in synch (Database = SQL Server 2008).
Database changes occur fairly regularly (adding columns, constraints, relationships, etc) and as a result it's not uncommon for people to do a 'Get Latest' from source ...
Does JPA/EJB3 framework provide standard way to do batch insert operation...?
We use hibernate for persistence framework, So I can fall back to Hibernate Session and use combination session.save()/session.flush() achieve batch insert. But would like to know if EJB3 have a support for this...
...
If you were to motivate the "pros" of why you would use an ORM to management/client, what would the reasons be?
Try and keep one reason per answer so that we can see what gets voted up as the best reasons
...
I'm looking at ORMs for Java and Active Objects caught my eye. Apparently, it was inspired by Rails' ActiveRecord. Based on what I've read, this approach seems to solve a lot of problems with existing Java ORMs by embracing convention over configuration.
What's been your experience with it?
...
Does anyone have any experience that indicates what kind of performance hit a developer could expect by choosing to use an ORM (in Django, RoR, SQLAlechemy, etc) over SQL and hand-designed databases? I imagine there are complicating issues, including whether specifying a database within the constraints of an ORM increases or decreases th...
It's a pretty open ended question. I'll be starting out a new project and am looking at different ORMs to integrate with database access.
Do you have any favorites?
Are there any you would advise staying clear of?
...
For me the answer is currently: No, I would use iBatis, because NHibernate is a pain, when the database model and the object model are not in synch. If I don't have full control over the database I end up with a lot of work.
Why do I ask?
Well, first of all: I never used NHibernate. I just know it from the surface. I have read about th...
I have model Foo which has field bar. The bar field should be unque, but allow nulls in it, meaning I want to allow more than one record if bar field is null, but if it is not null the values must be unque.
Here is my model:
class Foo(models.Model):
name = models.CharField(max_length=40)
bar = models.CharField(max_length=40, un...
A few weeks ago I asked the question "Is a PHP, Python, PostgreSQL design suitable for a non-web business application?" http://stackoverflow.com/questions/439759/is-a-php-python-postgresql-design-suitable-for-a-business-application
A lot of the answers recommended skipping the PHP piece and using Django to build the application. As I've...
When debugging everything appears good. The insert commits and there is no roll back, no exceptions. I sure hope some can help with this.
Here is my call:
using (ITransaction transaction = _session.BeginTransaction())
{
_session.Save(calc);
transaction.Commit();
}
Real simple mapping:
<hibernate...
Hi, is there a way, hot to apply paginator limit on select, which I send to findDependentRowset function? for example:
$select = $row->select();
$select->order('item_name');
$row->findDependentRowset($table, null, $select)
thank's
...