I have to call a previously created function on SQL, like
SET @ExtVALUE = sysdba.GetNextAccountExternalId('{TYPE}')
but I can't manage to find if OPF3 has some of this functionality already.
Need to use OPF3, direct access to the SQL connection is not feasible in the architecture.
I think in a solution somewhat like this:
var f...
We have a Oracle Date column. At first in our Java/Hibernate class we were using java.sql.Date. This worked but it didn't seem to store any time information in the database when we save so I changed the Java data type to Timestamp. Now we get this error:
springframework.beans.factory.BeanCreationException:
Error creating bean wi...
I have a User Model(:name, :password, :email), and Event model(:name, :etc) and Interest model (:name)
Then I created two join tables -> UsersInterests and EventsInterests; each not containing a primary key and only comprised of the user_id/interest_id and event_id/interest_id respectively.
I'm trying to use ActiveRecord to query a lis...
What is lazy loading in Java? I don't understand the process. Can anybody help me to understand the process of lazy loading?
...
I have the following tables and cannot edit their structure...
Person
------
Id PK
Code
Name
Order
-----
Id PK
Person_Code
OrderDetails
Now in my Person class I want to have a list of Orders for that person, but I'm not entirely sure how to go about setting up the mapping in fluent nhibernate to match on the Code column rather than t...
Please compare their strengths and weaknesses.
...
Suppose one is using Microsoft's Entity Framework as an ORM to abstract/work with a database. Next comes a requirement which causes the application to have the need to work with a WCF service and a traditional database, simultaneously.
To my knowledge no ORM tool exists that can abstract a WCF service in the same manner as Entity Frame...
What is ORM as it applies to Rails and what does it mean?
...
Hi everyone,
I'm just about to start a new project on ASP.NET MVC using LINQ to SQL for ORM. So, I have read and watched various tutorials about best practices and I wonder:
What is the benefit on using the pattern Pipes&Filters in my model (have in mind, I intend to use LINQ to SQL). Why just not use repository pattern in the model for...
I've got a rich domain model, where most classes have some behaviour and some properties that are either calculated or expose the properties of member objects (which is to say that the values of these properties are never persisted).
My client speaks to the server only via WCF.
As such, for each domain entity, I have a corresponding DT...
I have a very weird problem.
Have an application using Hibernate and spring.I have an entitymanger defined which uses a JNDI lookup .It looks something like this
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<propert...
Hi!
I have been struggling with the following problem:
I have a value object containing different panels. Each panel has a list of fields.
Mapping:
<class name="com.aviseurope.core.application.RACountryPanels" table="CTRY" schema="DBDEV1A" where="PEARL_CTRY='Y'" lazy="join">
<cache usage="read-only"/>
<id name="ctryCode">
<column name...
django has this complex ORM built in to it, but after spending much time on it, it is still hard for me to make queries that are remarkably simple in SQL. There are even some simple things that I can't find a way to do through the django ORM (e.g. 'select distinct column1 from tablename').
Is there any documentation that shows "For com...
Hi,
I have a User hibernate class, Clerk class and Consumer class. All these maps to their own tables in database. The User PK also acts as Clerk's and Consumer's PK.
So now my problem is that if a user is initially a Clerk, he has a record in Users table and Clerks table. If that user wants to become a consumer, I want to link that U...
We have the following test model in the dbml file:
For the test case there are 4 records in the table, 1 parent, 3 children. We are looking for the siblings of a specific record, including the specific record.
using (var db = new TestDataContext())
{
var query =
from f in db.Foos
where f.Name == "Two"
...
Hopefully this isn't a duplicate, but does anyone know of any (good) ORMs that work with SQL Compact Edition, and can run in the .NET Compact Framework (e.g. Windows Mobile 5->6.x)?
...
Hi,
I'm currently working with a large database (approx. 500 tables) all without any foreign keys define.
My question is there an easy way to set up the relationships within entity framework (version 1 or 2) without doing it all manually?
Also some of the tables have a complex relationship type. For example a customer has a parentID ...
I am looking for a way to have a typesafe primary key for my entities using generics in Hibernate. Instead of doing this
@Entity
public class User{
@PrimaryKey
Long id
}
I was thinking of doing this...
@Entity
public class User{
@PrimaryKey
PrimaryKey<User,Long> id
}
Or take the type inference even further...
Any ideas? Has ...
Hello everyone,
To anyone with experience of SQLAlchemy, this will be basic I am sure; But I don't find the docs that helpful and I am sick of scratching my head.
Given two classes:
class User(Base):
__tablename__='users'
id = Column(Integer, primary_key=True)
name = Column(String(32))
...
class UserPost(Base):
__...
Using Fluent NHibernate, I cannot seem to devise the necessary automapping conventions for the following (seemingly simple and common) use-case:
public class MyClass
{
private int _specialIdentityField
private string _firstname;
public Id { get { return _specialIdentityField; }; }
public virtual string Firstname
{
...