Hi,
what I would like to accomplish is the following:
have autocommit enabled so per default all queries get commited
if there is a @Transactional on a method, it overrides the autocommit and encloses all queries into a single transaction, thus overriding the autocommit
if there is a @Transactional method that calls other @Transaction...
in my applicationcontext.xml
<bean id="annotatedsessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="packagesToScan" value="testonly.package.model" />
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect...
how to decide whitch CacheConcurrencyStrategy to use? NonstrictReadWriteCache, ReadOnlyCache, ReadWriteCache, TransactionalCache . I read https://www.hibernate.org/hib%5Fdocs/v3/api/org/hibernate/cache/CacheConcurrencyStrategy.html but doesn't explain in detail enough
...
when using ehcache rather than defining statement like
<cache name="testonly.package.model.TestPOJOcategory"
maxElementsInMemory="200"
eternal="true"
overflowToDisk="false"
timeToIdleSeconds="300"
timeToLiveSeconds="600"
/>
can directly define inside entity independent of whatever cache pro...
Is there any tool which would allow for monitoring Hibernate 2nd level cache usage? I know that I could use Hibernate API for retrieving such information. But what should I do when I have application which doesn't read the information itself, and I can't modify it? Is there any way to read cache statistics from the outside of the applica...
I am using the Entity Framework now and constantly having to write inline sql because Entity framework does not support full text search and other features. Is there a ORM out there that has many features that supports advanced queries? I feel if I am going to sometimes write inline sql I might as well do all of it in inline sql. Any hel...
Are there any good database abstraction layers/object relational mappers/ActiveRecord implementations/whatever they are called for Android? I'm aware that db4o is officially supported, but it has quite a large footprint and I'd rather use a more conventional database (SQLite).
...
We are going to develop a new system over a legacy database(using .NET C#).There are approximately 500 tables. We have choosen to use an ORM tool for our data access layer. The problem is with namig convention for the entities.
The tables in the database have names like TB_CUST - table with customer data, or TP_COMP_CARS - company cars....
Hi everyone,
I'm asking this question given my chosen development frameworks of JPA (Hibernate implementation of), Spring, and <insert MVC framework here - Struts 1, Struts 2, Spring MVC, Stripes...>.
I've been thinking a bit about relationships in my entity layer - for example I have an order entity that has many order lines. I've set...
I am hitting an issue with my Hibernate backed Jpa queries returning data that is not up to date. I assume it is an issue with pulling data from the cache instead of the database itself.
For example, I will change and persist an object on one page and then go back to the previous page, which lists rows of the database, and it will show ...
I am sure that someone familiar with HQL (I am myself a newbie) can easily answer this question.
In my Grails application, I have the following domain class.
class Book {
org.joda.time.DateTime releaseDate //I use the PersistentDateTime for persisting via Hibernate (that use a DATETIME type for MySQL DB)
}
In my HQL query, I want t...
Hi,
Assume I have the following Groovy class (or the equivalent in Java)
class User {
Long id
String name
}
I would like to write a Hibernate query (either HQL or Criteria) which returns all the users that have at least one other user with the same name.
Update
The following query has been suggested
select min(user.id), u...
I'm using Doctrine as ORM in my project but ran against a strange error:
Using following YAML:
Album:
tableName: dpp_album
actAs: [Timestampable]
columns:
name: string(255)
description: string(255)
online: boolean
I then generate my models but upon refreshing my page and autoloading the models, PHP serves this error...
We are creating a small application that will be deployed to very limited machines. They have only 256mb of RAM.
I would like to use JPA as it simplifies the code and removes the need for JDBC ResultSet code. However, will the overhead of JPA on such small machines be a factor? I am thinking of using Toplink at the moment, which comes i...
Firstly I have three entities.
Users, Roles, Items
A user can have multiple Roles.
An item gets assigned to one or more roles.
Therefore a user will have access to a distinct set of items.
Now there is a few ways I can see this working.
There is a Collection on Users which has Roles via a many-to-many assoc. Then each Role in thi...
is there LINQ 2 GSQL implementation ?
Note : GSQL is the query language (SQL subset) used in Google AppEngine datastore
...
Using Django 1.1, how could I create a crosstab (pivot table) SQL query using the ORM?
UPDATED:
These are the models and output requirements:
class Store(models.Model):
name = models.CharField(max_length=255)
...
class Order(models.Model):
store = models.ForeignKey(Store, blank=True, null=True, related_name='orders')
description =...
Hi,
I'm trying to insert an HTML blob into our sql-server2005 database. i've been using the data-type [text] for the field the blob will eventually live in. i've also put a '@Lob' annotation on the field in the domain model. The problem comes in when the HTML blob I'm attempting to store is larger than 65536 characters. Its seems that...
Need some help on understanding how to do this; I'm going to be running recursive 'find' on a file system and I want to keep the information in a single DB table - with a self-referencing hierarchial structure:
This is my DB Table structure I want to populate.
DirObject Table:
id int NOT NULL,
name varchar(255) NOT NULL,
par...
I've observed the strange fact (based on the questions in the hibernate tag) that people are still actively using xml files instead of annotations to specify their ORM (Hibernate/JPA) mappings.
There are a few cases, where this is necessary:
you are using classes that are provided, and you want to map them.
you are writing an API, who...