I hardly see any pointer on the following problem related to Hibernate. This pertains to implementing inheritance using a single database table with a parent-child
relationship to itself. For example:
CREATE TABLE Employee (
empId BIGINT NOT NULL AUTO_INCREMENT,
empName VARCHAR(100) NOT NULL,
managerId BIGINT,
CONSTRAINT pk_empl...
I want to develop a simple orm which performs CRUD functionality.Shold i use reflection?
does libs like hibernate use reflection??
does using reflection will cause the speeed to drop down by a large extent?
...
Is there active development going on IBatis.Net DataMapper? Do they have version for .Net 3.5. I saw lots of activity on iBatis Java DataMapper as they are planning to release iBatis3 with annotation support. What is the status of its .Net counterpart?
...
I've been working on a Django project using South to track and manage database schema changes. I'm starting a new Java project using Google Web Toolkit and wonder if there is an equivalent tool. For those who don't know, here's what South does:
Automatically recognize changes to my Python database models (add/delete columns, tables etc...
Hi there.
I have the following class that generates sequencial Card Numbers.
I'm trying to recover from OptimisticLockException, by calling recursively the same method. however, i'm getting TransactionRequiredException. Dows anyone knows how to recover from OptimisticLockException in my case?
Thanks a lot in advance
@Name("simpleAutoI...
I am developing a Java Desktop Application and want a light database that can be used with Hibernate and that can be packed with an application.
I was going to use Derby database. It's size is near 2 MB. But before that I wanted to have views of experts on SO.
Will it work with Hibernate?
Actually, I am new to Hibernate and was studyi...
Just wondering what everyones thoughts on what ORM to use for SQL Azure?
I'm fairly comfortable using LINQ-to-SQL and I believe it is possible to get it working with SQL Azure. However, from my understanding (correct me if I'm wrong), no further improvements will be made to Linq-to-SQL in future releases of the .NET framework?
Alter...
What is the best place in servlet for Hibernate code that returns HibernateSessionFactory ?
I saw many examples: ones put db connection in service methods. Others - use smth like HibernateUtil (Singleton) that returns HibernateSessionFactory.
I don't know is it safe to use HibernateUtil in multithreaded Servlets ?
...
Hiii....
I am developing small spring application. I have to store the details of the student information in the database. I have develop one simpleformcontroller.I have used netbeans + hibernate mapping + spring. when I deploy the project,the following errors is occured.
please help me..
Thanks in advance.....
My spring-c...
I am using hibernate 3.2 with struts 1.2 framework
here is the details of versions hibenate3.2,asm-2.2.3,cglib-2.1.3
I got this exception when i m trying to load the object
I am using this code to load the object
public Currentprofile findById(java.lang.String id) {
log.debug("getting Currentprofile instance with id: " + id);
...
Hello,
For instance if I do something like:
Criteria c = session.createCriteria(Book.class)
.add(Expression.ge("release",reDate);
.add(Expression.ge("price",price);
.addOrder( Order.asc("date") )
.setFirstResult(0)
.setMaxResults(10);
c.list();
How can I use the same cr...
Does anybody know of a good list of what is new in JPA 2? Not what is new with Hibernate/TopLink in the version that supports JPA 2 but what is new in the actual spec.
...
when using hibernate with spring, can someone explain how the session unit of work and transactions are handled?
is the transaction started at the beginning of the page request, and committed at the end?
can I have multiple db calls per request, that each have different transaction levels? e.g. some are left as default, while others ar...
Hi all,
I have an entity that has a collection in it. The collection is a OneToMany unidirectional relationship storing who viewed a particular file. The problem I am having is that after I load the entity and try to update the collection, I don't get any errors, but the collection is never updated:
Entity:
@OneToMany(cascade = Casc...
Hi all,
I am a newcomer to hibernate. It would be great if someone could comment over the following query that i have:
Say i have a parent class and each parent has multiple children. So the mapping file of parent class would be something like:
parent.hbm.xml
<hibernate-mapping >
<class name="org.demo.parent" table="parent" lazy="tru...
Hello,
although I read through the manual here:
http://www.doctrine-project.org/documentation/manual/1_2/hu/hierarchical-data
I couldn't find a way to move a node from a Leaf to become a Root node. Any clues?
The question is trivial for inserting a new node...but what about updating a node?
...
Here's the problem: my input is XML file that looks something like:
<BaseEntityClassInfo>
<item>
<key>BaseEntityClassInfo.SomeField</key>
<value>valueData1</value>
</item>
<item>
<key>BaseEntityClassInfo.AdditionalDataClass.SomeOtherField</key>
<value>valueData2</value>
</item>
<item>
<key>BaseEntityClassInfo.AdditionalDataCla...
Is there any way to specify optional parameters (such as when search parameters are provided from a form and not all parameters are required) in a named query when using Hibernate? I'm using a native SQL query, but the question is probably applicable to named HQL queries as well.
I'm pretty sure the answer to this is 'no', but I haven'...
I tried something like:
MyModel.objects.filter(year__week=1)
It doesn't work. For now, I calculate the first day and the last day of the week and then use gte and lte, but it's less than efficient given that SQL comes with a Week function.
...
I have the classic setup
public class Parent {
Integer id;
...
// No generics
Collection someCollectionAttribute;
...
public void setChildren(Collection c) {
...
}
}
public class Child {
Integer id;
...
}
and I'm trying to map this on the usual table setup using iBatis (version 2.30... don'...