Hey,
A little briefing first; I've been a Delphi person for years, and been away from C# for two years. The last thing I've done in C# was a mid scale DB app with my own custom DAL. Ie, I had coded my own functions to retrieve data as list, functions to append data and so on. Now I am offered a small to mid scale project using C# WinFo...
I have a User and a set of Authorities in a one-to-many relationship:
User.hbm.xml:
<set name="authorities" table="authorities" cascade="all-delete-orphan">
<key column="user_id" />
<one-to-many class="com.ebisent.domain.Authority" />
</set>
When I delete a user, I want to delete the authorities as well, but what is happening...
Hello,
I am trying to make Doctrine generate SQL from a set of models that I created earlier with a YAML schema. Using the code below which comes from the manual the output should be a set of queries.
<?php
// test.php
require_once('bootstrap.php');
try
{
$models = Doctrine_Core::generateSqlFromModels('models/generated');
ec...
I want to disable reflection optimization (testing purposes), but i don't know where to do it. NH 2.1.2 uses hibernate-configuration in XML, and docs clearly state that this setting can not be set here. :/ I tried doing it the old App.config way with key/value pairs, no luck ...
Also, did NH 2+ version change something about reflection...
It seems doctrine 2 is compatible only with PHP 5.3 and up, and is NOT compatible with php versions before 5.3. Can someone confirm if this is true?
...
Hi guys,
I have got a onetomany relation in Hibernate:
@Entity
public class Project
@OneToMany(cascade = CascadeType.ALL)
@OrderColumn(name = "project_index")
List<Application> applications;
@Entity
public class Application
Now, I tried to update an application directly:
session.merge(application);
The result is...
The framework I'm starting to learn supports 2 ORMs out of the box. I don't think it matters for the purposes of this question to say which 2 ORMs. My question is more general than this. How do you in general decide which ORM to go with? I haven't used an ORM before, but I'm guessing there's a list of must-haves that any decent ORM must ...
Hibernate provides a mechanism to define multi column indexes via the Table. Is there a way to specify this is an ORM agnostic fashion via JPA or JPA2 (e.g. using the javax.persistence.* APIs)
...
Is there a (freely available) sample of a DDD domain model with an accompanying schema that makes use of several ORM features (inheritance, value types, etc) that could be used to test an ORM?
It's easy to create a simple Order/OrderItem schema, but that never prepares you for the intricacies down the road.
(I'm coming at this from a ....
hey has anyone successfully done this, do you have a simple example of this? the goal is to build a frontend to create the form thus the form variables being saved in the database.
do i need to know what fields are being saved /mirror with another table or can one do this in the same table?
...
I am trying to generate a query using EntityManager.createQuery for my ORM mapping classes. The resulting query's order by included the primary key field of the class by default even though I have specified two fields to order by in @OrderBy (sequenceOrderNo asc, nextXpath asc).
Can anyone advise me how to remove the default primary in...
Hi, I have some basic questions:
1) How many xml files involved in JPA+Hibernate combination, if JPA annotations were used? i am having just persistence.xml.
2) Is hibernate.cfg.xml needed, if i use JPA annotaions. Because, i didnt added it till now.
3) Shall anyone give me the list of basic JAR file names, in case of using JPA 2.0 & ...
I Have Single Table Inheritance in EF4.
when i use POCOs as it , it works will.
but if i want to put pocos code in base class then inherit from it i get this Error :
Blockquote
Mapping and metadata information could not be found for EntityType 'ConsoleApplication2.Service'.
this is my POCOs with parent (Solution ) and child ( s...
Hi, I am now using hibernate as ORM technique in my application. I have a table called Order and I want the hibernate to generates the ID for each instance when inserting new order into the table. Quite unusual, the desired auto-generated id should be something like this:
first time: jialhe001 and then jialhe002 .... jialhe003, jialhe0...
"Table 1" can have multiple instances of "Table 2". "Table 2" is one to one mapped with "Table A". But the instance for "Table A" is created by "Table B". "Table 1" need not always have an entry of "Table 2".
Table 2 has two columns say tb1 and tbA. tb1 references to primary key of "Table 1" and tbA to that of "Table A".
If the data f...
I'm currently researching how to add the Unit of Work pattern to my existing ASP.NET MVC application that uses NHibernate. I'm seeing a lot of variety in the various implementations and I'm having trouble determining which methods will work best in a given situation.
To help, I thought I would ask the Stack Overflow community to list t...
I have a peculiar SQLAlchemy ORM problem. This is occurring in a Pylons application, against a Postgresql 8.2 database using psycopg2 as my database driver under SQLAlchemy 0.6.0 (and tried with 0.6.4 as well)
I have defined a User model object that has (at minimum) the following properties:
class User(Base):
__tablename__ = 'users...
Using Hibernate 3.5.1 and MSSQL 2008
Hi trying to implement the typical DateCreated and DateModified columns. The issue I have is that the time must be set from the DB not the application.
For DateCreated I can set the property to generated = always and set a default constraint (yes that reads right damn MS) on MS SQL 2008 to a default...
In all the examples I have seen, ORM's tend to be used directly or behind some kind of DAL repository (presumably so that they can be swapped out in the future).
I am no fan of direct ORM use as it will be hard to swap out, but i am equally no fan of losing the full domain change tracking it provides!
In the past I would have written ...
Hi all,
I am trying to change my web-app's JDBC code to JPA using Hibernate as provider. I am using Eclipse IDE. In that i have defined a MySQL data source. I added it in the persistence.xml.
But, I am getting the below error.
6640 [30289364@qtp-7494106-7] ERROR org.hibernate.connection.DatasourceConnectionProvider - Could not find da...