I'm about to start developing a web-based application that I can best describe as a specialized version of 37Signal's Highrise contact management app, targeted towards service businesses such as lawn care. I've decided to use ASP.NET MVC to take advantage of my BizSpark membership and to leverage the C#/ASP.NET/SQL Server that I already...
By default if I create a field in an entity like:
@NotNull
boolean myBoolean;
And I let Hibernate auto-create my tables. What Oracle data type will this map to?
...
Hi
Is it possible in hibernate to print generated sql queries with real values instead of question marks?
How would you suggest to print queries with real values if its not possible with hibernate api?
Umar
...
This is a pretty fundamental question when using NHibernate in a web application, but I don't see any agreed best practice when searching the web. I've seen it done in lots of different places:
Created and disposed in the Repository method - This just seems silly to me, since when you get the object it's already detached.
At the begin...
For a number of reasons (all of which can, basically, be broken down to bad management decisions) we're unable to switch to PHP5, meaning we'll have to support PHP4 for probably a few more years.
Since a lot of our applications (as with a lot of web apps) are glorified CRUD apps, and because I like to pick up the occasional home project...
How would I represent the following in a CakePHP model?
Product
=======
product_id
....
Cart
====
cart_id
....
Carts_Products
==============
cart_id
product_id
quantity
...
I am making some small "business intelligence" applications/tools that need to talk to other systems. Primarily accounting systems that believe that databases are an integration layer (or are too lazy to provide an api).
What's the easiest way of getting specific data out of a third party database and into my Java objects?
Notes:
(I...
I have two classes A and B. Many B's can have association with a single A, hence a many-to-one relationship from B to A. I've mapped the relationship like:
<class name="A" table="tbl_A">
<property name="propA" column="colA"/>
</class>
<class name="B" table="tbl_B">
<property name="propB" column="colB"/>
<many-to-one name="a" class...
hello good people
So far i've been working with only a case with 2 properties with and as logical operator so i use LogicalExpression like so
Criterion eqRef = Restrictions.eq("referenceID", referenceId);
Criterion eqType = Restrictions.eq("verificationType", type);
LogicalExpression and = Restrictions.and(eqRef, eqType);
this time al...
I have a parent/child relationship in my schema. I'd like to use very similar code to modify an existing parent as to create a new one. The edit case is easy to find the children:
my $parent = $resultset->find($parent_id);
my @children = $parent->children->all
However, in the new case, something weird happens:
my $parent = $resultset...
Grails GORM does not persist abstract domain classes to the database, causing a break in polymorphic relationships. For example:
abstract class User {
String email
String password
static constraints = {
email(blank:false, nullable:false,email:true)
password(blank:false, password:true)
}
static hasMany = [membership:GroupMembers...
Hi,
I previously asked a question regarding modeling of a situation with Users, Items, and UserRatings. In my example UserRatings are associated with one User and one Item. A good answer was provided by Nathan Fisher and I've included the model he suggested below.
But I now have a question regarding retrieval of these objects.
The...
In my application, I am storing a small table containing 50 records in a singleton class because the data in this table hardly changes - e.g. the list of countries.
Although, the concept is not good, I have to continue with it right now. Is there any solution in Hibernate which observe change in the table and on change, invoke a method...
My Android app is reading and writing to a local SQLite DB from a few different Activities and a Service. Pretty standard. But I'm not happy with the way I've got all the DB details stored as constants that I then use anywhere I access the DB. I've been advised to wrap the DB in a ContentProvider. Sounds good to me. While I'm refactoring...
While designing ORM, what is the best approach to represent the relationship, performance-wise? I mean, out of the following two, which approach is best considering performance?
class Employee
{
int ID { get; set; }
String Name { get; set; }
int DepartmentID { get; set; } //This approach uses DepartmentID
}
--- OR ---...
I got the impression that if we use persistent fields, there is no need for getter methods since the entity manager references the instance variables directly. However, when I removed the getter and setter methods from an entity to have persistent fields, the values for the corresponding instance variable was not retrieved from the datab...
I am in the process of developing a desktop application that needs a database. The application is currently targeted to SQL Express 2005 and works wonderfully. However, I'm not crazy about having this dependency on SQL Express and would prefer to use a small file-based database.
My problem is that I am using Entity Framework. I have ...
Since web applications are mostly stateless, and linear (request comes in, response goes out), is change-tracking really necessary?
E.g. if I have an action that updates a Product instance I know at code-time what state I'm changing, I can just tell the repository "please update this instance".
To clarify, my question is about the chan...
In a vb .net winforms app I am trying out something for "wide and shallow" children of a record. I use strongly typed business objects ( Strataframe ).
My plan is to have a number of "child tables" collected in a dataset I drop on the form. they have no correspondence in persisted data, so the dataset is untyped and I am creating th...
What is the difference between LINQ and Entity Framework
Are both LINQ and Entity Framework both considered ORM?
What is the advantages of both.
...