I am trying to persist an Entity with a @Lob annotated String field. The content of that fiels if bigger than the 40k buffer size limit.
The first problem I had was related to the setString method used internally by the JPA implementation (Hibernate in my case) and the Oracle JDBC Driver. This problem was solved adding
<property n...
Hi.
I have following structure with example data:
id season_id title
1 1 Intro
2 1 Second part
3 1 Third part
4 4 Other intro
5 4 Other second part
(don't ask why), where season_id is always point to id of first episode of season...
What i want, to get follo...
I have a class A which have a list of B elements.
In my A class i would like to add:
int size;
which will be valued with the number of B elements. So when I would call myA.getSize() I will have it.
Is it possible to map a count query with a single property in the hibernate mapping?
I don't want to load the list that is why i woul...
In this example com.test.Cat extends com.test.Animal and there is no field DB in CAT table of com.test.Cat explicitly defining its type (it wasn't me).
When I query my animals from DB I get a collection of Animals.
It is possible to sort them by class name:
order by r.class
but is there a way to use class name as a criteria? For exa...
I'm getting NoPrimaryKeyException when I try to run one of my unit tests which uses DBUnit. The datatable is created using Hibernate and is a join table between two classes mapping a many to many relationship. The annotations that define the relationship are as follows:
@Override
@ManyToMany
@JoinTable(name="offset_file_offset_entries",...
I have created a case insensitive dictionary in C Sharp as follows . And the following code throws an exception, since the dictionary is case insensitive.
IDictionary<string, ABCentre> names = new Dictionary<string, ABCentre>(StringComparer.OrdinalIgnoreCase);
names.Add("LC001", new ABCentre());
if (names.ContainsKey("...
hey,
I'm fairly new to Django and have a basic question: I want to use an ORM that I can work with it for Django and other python projects, so the basic question is Django ORM agnostic and if so how can I use SQLAlchemy with it for example?
If it's not, then what do you suggest for the above problem (using ORM objects that works with ...
Hi,
I've got two objects a parent and a child list. In my fluent nhibernate mapping for the parent I want to load the list of the children.
However I want this to be conditional, a column in the child table is called "IsDeleted" and I only want to return the children where "IsDeleted" is false.
Is it possible to set up a mapping to d...
Techniques: ORM, Doctrine 1.1.6, KohanaPHP
With Doctrine 1.1.6. How do I spread a model over different tables?
Detailed situation:
I have the class Entity which contains an ID, login and password and has one emailaddress, many addresses and some other relations. I have two other classes, Company and Person, which extend Entity. I want...
Can I use the structures in System.Data.SqlTypes with the Oracle db driver? MSDN says:
The System.Data.SqlTypes namespace provides classes for native data types in SQL Server.
Is that it? End of line? I would really like to use these types but not if they tightly couple my code to a SQL Server.
...
Task:
columns:
name: string(100)
parent_id: integer
relations:
Parent:
class: Task
local: parent_id
foreign: id
foreignAlias: Subtasks
...
I have recently been trying to learn more about the Entity Framework technologies from Microsoft. I have found a situation which I am not sure if it is possible (or correct) to solve using EF.
I have lots of entities that can be referred to by lots of different names. For example, a persons occupation maybe described as "Coder", "Progra...
I have been looking around the current options (and related SO questions) regarding PHP ORM solutions, however I have a couple of unique requirements:
I am running PHP on Windows Server 2003
I need to interface with SQL Server 2005
I can't seem to find a simple answer from the PHP ORM solutions out there as to which (if any) support ...
They seem complex and unnecessary. The applications I've built at work or home have never used any ORM and many of them haven't been even Object-oriented. Is it depenpable about size when they can be useful. How to determine how big a application should be when they be useful?
...
I'm trying to figure out where (in the various layers) the business entities should start and the object to table mapping end.
Should business entities surface out of the repository layer or out of the service layer?
I'm wondering cause initially i thought it should surface from repository layer, but let's see my concerns in this case.
...
http://en.wikipedia.org/wiki/Object-relational_impedance_mismatch
I've worked with several projects and all have they used a database centric design and it seems to work fine.
It seems that it's a new idea flourishing and now it seems fine but the value of it has yeat to be tested or am I wrong?
...
I am running Hibernate 3.2.0 with MySQL 5.1. After updating the group_concat_max_len in MySQL (because of a group_concat query that was exceeding the default value), I got the following exception when executing a SQLQuery with a group_concat clause:
"No Dialect mapping for JDBC type: -1"
-1 is the java.sql.Types value for LONGVARCHAR....
I have a table Users
CREATE TABLE "USERS" (
"ID" NUMBER NOT NULL ,
"LOGINNAME" VARCHAR2 (150) NOT NULL )
and I have a second table SpecialUsers. No UserId can occur twice in the SpecialUsers table, and only a small subset of the ids of users in the Users table are contained in the SpecialUsers table.
CREATE TABLE "SPECIALU...
What is the best way to generate C# classes for use with Castle ActiveRecord and NHibernate given an existing database structure?
Can you recommend any of the class generation tools or is it just less hassle to write the classes by hand?
...
Using annotations how do you map a field in an entity which is a "Map" (Hashtable) of String to a given object? The object is annotated and instances of it are already stored in the hibernate databse.
I've found the syntax for definging a map with a simple key and value as such:
<class name="Foo" table="foo">
...
<map role="age...