I'm mapping a set of tables that share a common set of fields:
So as you can see I'm using a table-per-concrete-type strategy to map the inheritance.
But...
I have not could to relate them to an abstract type containing these common properties.
It's possible to do it using EF?
BONUS: The only non documented Entity Data Model Map...
That seems simple enough, but all Django Queries seems to be 'SELECT *'
How do I build a query returning only a subset of fields ?
...
from an instance of Site with a ManyToMany relationship to Kiosk, i'd like to check if a Kiosk object is part of the relationship.
I could do
self.apps.get(id=app_id).exists() and check if True
or
self.apps.get(id=app_id) and catch the ObjectDoesNotExist error
or
self.apps.filter(id=app_id) and check if True
If I have to ca...
im trying to find a php framework to build small,multilingual sites.
do you know a php framework with support for:
1.sqlite (it will be little sites so no performance problem and good for copy-paste from development to production)
2.orm
3.i18n & l10n
4.easy search addon
5.ability to just copy-paste no need to change config for goin...
The question is this.
I have a number of persisted objects that I'll pull using Hibernate.
But during the application lifetime I'll create a few objects that
do not live outside the running time of an app.
They are temporary, for example contain user's choices, and they also hold
links to the persistent objects(tables). But as soon as...
How do I programmatically attach a Doctrine Behaviour to a table dynamically created through $conn->export->createTable('MyTable', $definition)?
For example, if I have the following code:
$definition = array(
'id' => array(
'type' => 'integer',
'primary' => true,
'autoincrement' => true
),
'name' => ...
Hello again,
In the projects where Hibernate is my persistence provider, I can issue queries with 'join fetch' expressions, and Hibernate will generate SQL that mirrors that: SQL containing join expressions using valid paths of comparison.
EclipseLink, however, issues SQL with ugly cartesian plans, that hurt performance quite badly. Wh...
What are the advantages and disadvantages of Hibernate & EJB3 relative to each other?
I found this post, but it didn't really address my question. If I don't have any particular tie to either technology, what would cause me to pick one over the other? Or are there situations where I would want to use both?
Thanks,
Zack
edit: in respon...
In essence this is a followup of this question. I'm beginning to feel that I should give up the whole idea, but I'll give it one more shot.
What I want is pretty much like a DB transaction. It should track my changes to the DB and then in the end allow me to either commit or rollback them. If I insert an object, I should get it back in ...
My "HelloJPA" code (below) tries to store an Employee in a datastore. However, any attempt to read the persisted object after committing the (resource local) transaction is rewarded with an "IllegalStateException":
Employee employee = ...
EntityManagerFactory factory =
Persistence.createEntityManagerFactory( "HelloJPA", System.getPr...
I'm using the relatively immature Joose Javascript ORM plugin (project page) to persist objects in an Appcelerator Titanium (company page) mobile project. Since it's client side storage, the application has to check to see if the database is initialized before starting up the ORM since it inspects the DB tables to construct the classes. ...
Let's say your have the following table structure:
==============================
| Case |
==============================
| Id | int |
| ReferralType | varchar(10) |
+---------| ReferralId | int ...
How do you ORM a view?
Is there any difference with a table in terms of reverse engineering?
In my case, I have a whole pile of joined tables that will be read-only in an application.
So, if I need sort of an Object with all collections in proper order, instead of long
chains of relationships - collection with another etc, it'll be si...
Hi,
lacking a fellow programmer to talk over the right approach for my problem, I decided to ask you. What is your preferred approach of mapping dictionary tables to a model in MVC paradigm, regardless of the MVC framework / environment you are using?
My problem is I have a couple of database tables that only serve as dictionaries and ...
I'm using iBATIS to call a Stored Procedure on MSSQL Server, the input parameters are properties on a POJO that is put to the map:
Map<String, Object> saveMap = new HashMap<String, Object>();
saveMap.put("obj", myArticle);
update("save", saveMap);
All parameters are set correctly as input to the procedure so nothing wrong there. But o...
How can I use my own connection Provider when using iBatis Data Mapper? I have to use UserId and Password of the user performing the db operation in the ConnectionString? E.g. The following ConnectionString has to be modified to insert the userid and password for user performing the db operation.
Data Source=TEST;Persist Security Info=T...
I have a query that I'm trying to figure the "django" way of doing it:
I want to take the last 100 calls from Call. Which is easy:
calls = Call.objects.all().order_by('-call_time')[:100]
However the next part I can't find the way to do it via django's ORM. I want to get a list of the call_types and the number of calls each one has WITH...
This should be easy but for some reason I'm having trouble finding it. I have the following:
App(models.Model):
...
Release(models.Model):
date = models.DateTimeField()
App = models.ForeignKey(App)
...
How can I query for all App objects that have at least one Release?
I started typing:
App.objects.all().annotate(re...
I hope the title and following text are clear, I'm not very familiar with the correct terms so please correct me if I get anything wrong. I'm using Linq ORM for the first time and am wondering how to address the following.
Say I have two DB tables:
User
----
Id
Name
Phone
-----
Id
UserId
Model
The Linq code generator produces a bun...
Lets say I have the following mapping:
<hibernate-mapping package="mypackage">
<class name="User" table="user">
<id name="id" column="id">
<generator class="native"></generator>
</id>
<property name="name" />
<property name="age" />
</class>
</hibernate-mapping>
Is it possible to select the oldest user (that i...