I am creating a custom UserType class in Hibernate. The specific case is for an HL7v3 clinical document (I work in health IT). It is a mutable object and most of the documentation around the Hibernate UserType interface seems to center around immutable types. I want a better understanding of how and when the interface methods are used, s...
Hi there,
I have an enum type on my Java model which I'd like to map to a table on the database. I'm working with Hibernate Annotations and I don't know how to do that. Since the answers I search were rather old, I wonder which way is the best?
Thanks in advance
...
It seems like EclipseLink has been chosen by sun as the reference implementation of JPA 2.0, nevertheless I see lots of people continue to use hibernate...
I have no experience with any of them, so I wonder which one should I choose for a new project...
I'd like to know the pros / cons of each one...
thanks a lot
ps: btw, and this is...
Which orm you would recommend for a beginner moving from ado.net?... Thus far used ado.net stored procedures with asp.net and now like to move with an orm.. Any suggestion..
...
A good thing in LINQ to SQL was a fast and reliable way to map database tables and convert them into classes accessible from c# project. However it is no longer recommended to create projects using LINQ to SQL.
What is its substitute? What kind of tool should I use in VS 2010 today if I want to have the same functionality as I had with ...
Hi,
I'm doing query like that:
SomeObject.objects.annotate(something=Avg('something')).order_by(something).all()
Now, I normally have an aggregate field in my model that I use with Django signals to keep in sync, however in this case perfomance isn't an issue so I thought I'd keep it simple and just use subqueries.
This approach, h...
I'm writing an application in Python where I wish to use sqlite as the backing store for documents edited by the app, with documents generally living in memory, but being saved to disk-based databases when the application saves.
Ideally I'd like to use something like an ORM to make access to the data from my Python application code simp...
What is detached persistance and transient object in hibernate ?
please clearify me with example..
Thankx in advance..
...
i read that upon session.flush()
The
data will be synchronized (but not committed) when session.flush() is called
what is synchronized with what..
whether it is DB state that will come to memory by querying or
memory state will be copied to Db ?
clarify this plz..
...
The master page in my web application does authentication and loads up the user entity using a Get.
After this whenever the user object is needed by the usercontrols or any other class I do a Load.
Normally nhibernate is supposed to load the object from cache or return the persistent loaded object whenever Load of called. But this i...
Hi I am aware of the Hibernate Eclipse plugin that helps us (through a series of screens and button clicks) to generate the POJO and DAO classes for the underlying tables. But I would like to mimic this in a runtime environment, i.e. I would like to be able to do the exact same steps programmatically , where I should be able to supply th...
table A and B need to have 1:M relationship
a and b are added during application runtime, so A created, then say
4 B's created. Each B instance has to come in order, so that I could later
extract them in the same order as I added them.
The app will be a web-app running on Tomcat, so 10 instances may work simultaneously.
So my question...
Hello , I want to design a orm tool for my daily work, but I'm always worry about the mapping of foreign key.
Here's part of my code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
namespace OrmTool
{
[AttributeUsage(AttributeTargets.Property)]
public class ColumnAttrib...
I have this Model
class inventory_transaction(models.Model):
stockin = models.DecimalField(blank=True, null=True,max_digits=8, decimal_places=2)
stockout = models.DecimalField(blank=True,null=True,max_digits=8, decimal_places=2)
from_container = models.ForeignKey(container_identity)
staffs = models.ForeignKey(staff_n...
What does setting SubClassFetchMode e.g. to EAGER_PARALLEL actually do?
Why would one want a subclass to have a different FetchMode?
The implementation spec for KODO and OpenJPA is notoriously bad and I can't figure it out.
...
This is weird and probably not possible but I'll ask anyway. I'm making this app that reads in a meta file and creates some tables then populates them with data. I was wondering if I could somehow use JPA to populate those tables. Obviously, there's no way I could have an entity with annotations on it since the table didn't exist at c...
Is there any class generator for bltoolkit?
...
We have a great project that use NHibernate as ORM. We want to migrate to L2S or L2EF. Can we do everything that we do by NHibernate?
Do you propose us that doing this work? What is the advantages and disadvantages of this work?
Are these two ORMs have common capabilities?
Note: Our project written in C#.
...
Table SUBCOURSE references COURSE
COURSE(id, name)
SUBCOURSE(id, course_id, name)
So, 1:M.
Hibernate generates for Course:
@OneToMany(fetch = FetchType.LAZY, mappedBy = "course", cascade = CascadeType.ALL)
public Set getSubCourses() {
return this.subCourses;
}
for Subcourse it generates
@ManyToOne(fetch = ...
Hi,
In Hibernate when i save() an object in a transaction, and then i rollback it, the saved object still remains in the DB. It's strange because this issue doesn't happen with the update() or delete() method, just with save().
Here is the code i'm using:
DbEntity dbEntity = getDbEntity();
HibernateUtil.beginTransaction();
Session sessi...