orm

graphical relationship map for doctrine/mysql?

i wonder if there is gui tools for creating a graphical map for the relationship between models/objects (doctrine) or tables (mysql)? it would be better than draw it manually. i´ve already have the models/objects and tables created. ...

Hibernate violation error

Hi All, I am having a designation table with d_name as primary key which i am using in user table as foreign key reference .I am using hbm for mapping in designation hbm i have id defined as d_name mapped to database column .I am getting a error saying "integrity constraint violation(user_designation_fk) parent key not found. " Wher...

JPA ManyToMany referencing issue

I have three tables. AvailableOptions and PlanTypeRef with a ManyToMany association table called AvailOptionPlanTypeAssoc. The trimmed down schemas look like this CREATE TABLE [dbo].[AvailableOptions]( [SourceApplication] [char](8) NOT NULL, [OptionId] [int] IDENTITY(1,1) NOT NULL, ... ) CREATE TABLE [dbo].[AvailOptionPlanTypeA...

help with generating models from database for many to many in doctrine

im using doctrine and i have set up some test tables to be generated into models: I want a many-to-many relationship models (3 tables converted into 3 models) (things are simplified to make the point clear) mysql tables: user: id INT // primary key name VARCHAR group: id INT // primary key name VARCHAR user_group: user_id INT // pr...

Maven hibernate jar not found (3.5.1-Final)

Hello, i'm trying to update the hibernate dependecy in my pom, I had the 3.3.2.GA version and i changed to 3.5.1-Final. But maven can't find the jars in the repo, so checking the url. http://repository.jboss.org/maven2/ in the hibernate section. I can see that there are't any jar, only pom's. But If i check the entity manager section ...

Want to store profiles in Qt, use SQLite or something else?

I want to store some settings for different profiles of what a "task" does. I know in .NET there's a nice ORM is there something like that or an Active Record or whatever? I know writing a bunch of SQL will be fun ...

Doctrine Many to Many

Hello, I have a question about Doctrine ORM M:M. I built some tables like this: -User +id +name -Group +id +name I want to link these table via a new table with Doctrine: In Group class: $this->hasMany('User as Users', array( // I'm wondering what I can fill here 'refClass' => 'UserGroup' )); and in th...

difference between uni-directional and bi-directional relational relationship?

i wonder what these two words mean. i encountered them in Doctrine's documentation. but i cant understand what they mean. ...

What is Castle proxy factory in NHibernate?

What is Castle proxy factory in NHibernate? What is its task? What the means of proxy in this case? ...

ORM in the realworld

I am begining a new project that i think will last for some years. Am in the point of deciding the ORM framework to use (or whether to use one at all). Can anyone with experience tell me whether orm frameworks are used in realworld applications. The problem i have in mind is this: The orm tool will generate for me tables and columns etc ...

Generation of Create_Date and Update_Date columns using Hibernate

I'm using straight Hibernate 3.0 without annotations. When saving or updating domain objects, I would like to have Hibernate automatically generate the CREATE_DT and UPDATE_DT fields, as opposed to using database triggers. What are the best practices for accomplishing this? The background is that I have an object graph being passed ...

Map denormalized hibernate

I have a Summary class which contains a list of Qualities. A Quality contains a String name and int value. This data is stored in a denormalized db structure, one table only, for both Summary and Quality. Quality table: id, somefileds, qualityname1, qualityvalue1, qualityname2, qualityvalue2, qualityname3, qualityvalue3 For each quali...

Which Java ORM is considered the most performant generally speaking?

Which Java ORM is considered the most performant generally speaking? I realize this could mean less features, but just want an idea. ...

How to find out efficiently the auto-generated id for a new object when using JPA?

Hello, I have an attribute which is annotated with @Id. The ID is going to be generated automatically when persisting the object. That means that the ID-value is not defined before I persist the object. After persisting it, it has an ID (in the database), but unfortunately the field still remains null as long as I don't reload it from t...

JPA 2 and Hibernate 3.5.1 MEMBER OF query doesnt work.

I'm trying the following JPQL and it fails misserably: Query query = em.createQuery("SELECT u FROM User u WHERE 'admin' MEMBER OF u.roles"); List users = query.query.getResultList(); I get the following exception: ERROR [main] PARSER.error(454) | <AST>:0:0: unexpected end of subtree java.lang.IllegalArgumentException: org.hibernate....

Do ORMs normally allow circular relations? If so, how would they handle it?

I was hacking around trying to make a basic orm that has support for the one => one and one => many relationships. I think I succeeded somewhat, but I am curious about how to handle circular relationships. Say you had something like this: user::hasOne('car'); car::hasMany('wheels'); car::property('type'); wheel::hasOne('car'); You co...

Database design MySQL using foreign keys

I'm having some a little trouble understanding how to handle the database end of a program I'm making. I'm using an ORM in Kohana, but am hoping that a generalized understanding of how to solve this issue will lead me to an answer with the ORM. I'm writing a program for users to manage their stock research information. My tables are...

Doctrine_Record doesn't set PK in object after save()

Per documentation, Doctrine_Record after saving should set id of newly created record as object property. In my case, new record is created, but not value is set on object (while database has this new id value). What has caused this? $user1 = new ModelUsers(); $user1->save(); echo "last insert id=" . $user1->UserId; PS UserId is confi...

Is an ORM redundant with a NoSQL API?

Hello, with MongoDB (and I assume other NoSQL database APIs worth their salt) the ways of querying the database are much more simplistic than SQL. There is no tedious SQL queries to generate and such. For instance take this from mongodb-csharp: using MongoDB.Driver; Mongo db = new Mongo(); db.Connect(); //Connect to localhost on the d...

Hibernate Relationship Mapping/Speed up batch inserts

I have 5 MySQL InnoDB tables: Test,InputInvoice,InputLine,OutputInvoice,OutputLine and each is mapped and functioning in Hibernate. I have played with using StatelessSession/Session, and JDBC batch size. I have removed any generator classes to let MySQL handle the id generation- but it is still performing quite slow. Each of those table...