I have several Java classes with double fields that I am persisting via Hibernate. For example, I have
@Entity
public class Node ...
private double value;
When Hibernate's org.hibernate.dialect.Oracle10gDialect creates the DDL for the Node table, it maps the value field to a "double precision" type.
create table MDB.Node (... val...
I have 2 databases with a 2 tables with HierachyID fields.
For one database I can get a dal cs file, for the other database I cannot get a dal cs file ?
HBus is a database I can get the dal cs for, ...
SqlMetal /server:.\SQLSERVER2008 /database:HBus /code:HBusDC.cs /views /functions /sprocs /namespace:HBusDC /context:HBusDataContext
...
For my iPhone app, I'm consuming a RESTful service and getting JSON. I've found libraries to deserialize this into an NSDictionary. However, I'm wondering if there are any libraries to deserialize the JSON/NSDictionary/Property List into my object (an arbitrary one on my side).
The java equivalent would be the object-relational mappers ...
Hello, i have an application with use Hibernate and Mysql. In Mysql i have a blob in my table.
When i record a value in this table with accent like é or è in mysql i have a good result (binary) so when i want read into my jsp i have ? instead of é
...
I am new to django and need some quick help.
How will the following sql statement be translated in django ORM?
SELECT * from table_name WHERE field1
= v1 OR field2 = v2
Thanks in advance!
...
Hi,
We have a web application running in a production enviroment and at some point the client complained about how slow the application got.
When we checked what was going on with the application and the database we discover this "precious" query that was being executed by several users at the same time (thus inflicting an extremely hi...
I have this class mapped
@Entity
@Table(name = "USERS")
public class User {
private long id;
private String userName;
}
and I make a query:
Query query = session.createQuery("select id, userName, count(userName) from User order by count(userName) desc");
return query.list();
How can I access the values returned by th...
Hi,
I'm using Hibernate with Xml mappings. I have an entity that has two fields creationDate and updateDate of type timestamp, that have to be filled with the current UTC time when the entity is persisted and updated.
I know about the existence of the @PrePersist and @PreUpdate annotations, but i don't know how to use their equivalent in...
One advantage that comes to my mind is, if you use Poco classes for Orm mapping, you can easily switch from one ORM to another, if both support Poco.
Having an ORM with no Poco support, e.g. mappings are done with attributes like the DataObjects.Net Orm, is not an issue for me, as also with Poco-supported Orms and theirs generated proxy...
I have two models device and log setup as such:
class device(models.Model):
name = models.CharField(max_length=20)
code = models.CharField(max_length=10)
description = models.TextField()
class log(model.Model):
device = models.ForeignKey(device)
date = models.DateField()
time = models.TimeField()
data = models.C...
I know there already are a lot of posts floating on the web regarding this topic.
However, many people tend to focus on different things when talking about it. My main goal is to create a scalable web application that is easy to maintain. Speed to develop and maintain is far more appreciated BY ME than raw performance (or i could have u...
Hi all,
Can anyone tell me whether Hibernate supports associations as the pkey of an entity? I thought that this would be supported but I am having a lot of trouble getting any kind of mapping that represents this to work. In particular, with the straight mapping below:
@Entity
public class EntityBar
{
@Id
@OneToOne(optional = ...
In our application we are pulling data from a DB2 mainframe database. If the database has "low values" in a field, hibernate sends a "null" value in the object. This occurs even if the column is defined as "not null".
As we are doing XML parsing on this, Castor is having trouble with it. I would like to fix this in Hibernate. Also, ...
Hi all,
In my code I am updating two table, one after the other.
update(table1_details);
update(table2_details);
So if the update fails in table1 , table2 should not be updated or should be rolled back.
How to handle this situation. I know I have to use transaction. Can some one help with code !!!
I am using Java with spring and hi...
Checked ActiveRecord, DataMapper, Sequel: some use globals (static variables) some require open db connection before loading source file with models. What ORM is better to use in sinatra application that uses different databases.
...
Is it possible to chose what columns I want in return from Session.CreateCriteria() ?
egz.:
var x = session.CreateCriteria();
x.CreateAlias("EmployeePosition", "employeePosition");
x.Add(Restrictions.Eq("employeePosition.Name", "Developer"));
and is there a way to add something like "select LastName" to avoid downloading the ...
I've recently updated from hibernate 3.3.1.GA to hibernate 3.5.0 and I'm having a lot of performance issues. As a test, I added around 8000 entities to my DB (which in turn cause other entities to be saved). These entities are saved in batches of 20 so that the transactions aren't too large for performance reasons.
When using hibernate ...
I have a class Player that contains a list of Accessory objects. There are two kinds of Accessories. SocketedAccessories have a list of SocketJewels, and MagicAccessories have a list of MagicEnchantments.
At the database level, there is a players table that represents the player, and an accessories table that contains a list of access...
Running KODO 4.2 and having an issue inefficient queries being generated by KODO. This happens when fetching an object that contains a collection where that collection has a bidrectional relationship back to the first object.
Class Classroom
{
List<Student> _students;
}
Class Student
{
Classroom _classroom;
}
If we create...
Given a [mysql] database with a given schema, is it possible to generate an ORM interface for it? doesn't matter if its php, python or perl.
in other words, I have a database and I have to ask it a few questions. while I could just craft a bunch of SQL queries (okay, several dozen), this is way more interesting to think about.
is this ...