[jboss-dev-forums] [Design of JBoss jBPM] - Re: various questions

gavin.king@jboss.com do-not-reply at jboss.com
Mon Feb 26 11:53:57 EST 2007


I'm really happy to see this discussion. I've been asking for this for a while now, so its good to see it might actually happen.

The thing is that, from a pure *data modelling* perspective (forget jBPM, forget usecases, forget Hibernate), all tables should have unique natural keys, as well as the surrogate key that is used for maintaining relationships. Otherwise, the table is not a proper relation. (It does not represent a set of things.)

Tom is totally wrong to suggest that this is a limitation of JPA/Hibernate (he needs to read Hibernate in Action where this is discussed carefully). You simply can't use a surrogate key for equals(), it can't possibly work, and it doesn't make sense anyway from a user point of view.

And, of course, anytime you don't have a natural key, it becomes waaay more difficult to find the data you are looking for (the surrogate key is meaningless to the user).



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022533#4022533

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022533



More information about the jboss-dev-forums mailing list