From: Lenny S. <lr...@fa...> - 2002-08-27 14:12:51
|
From: Lenny S. <lr...@fa...> - 2002-08-27 14:12:51
|
From: Yaron Z. <ya...@id...> - 2002-08-30 21:21:35
|
Hi, On an earlier post, Gavin proposed to follow my proposal and make an API modification - there were no objections for that. I would like to understand what is the next step. If there is an issue with implementing the change, I hereby volunteer to implement it. Assuming I will make the modification soon, is there a chance to get it into 1.1? Thanks, Yaron. ---------------------------------------------------------------------------- ----------------------------- Quote from Gavin http://sourceforge.net/forum/forum.php?thread_id=722838&forum_id=128638 Yaron Zakai makes a suggestion I quite like. I've seen that new users often have trouble realizing they need to use insert() instead of save() when they want to use application-assigned ids. People seem to expect that the "assigned" id generator will just use the existing id of an object when you call save(). Secondly, some people would like insert() to cascade to insert(). Whereas other times insert() to save() is appropriate. So I would like to deprecate the following methods: Session.insert(Object) Session.insert(Object, Serializable) and add the following method Session.save(Object, Serializable) (which does exactly what Session.insert(Object, Serializable) used to do.) Then we would deprecate the IDGenerator interface and replace it with: public interface IdentifierGenerator { public Serializable generate(SessionImplementor session, Object entity) throws ..... ; } |
From: Mark W. <mor...@SM...> - 2002-08-30 21:37:34
|
Yaron Zakai wrote: >Hi, > > On an earlier post, Gavin proposed to follow my proposal and make an API >modification > - there were no objections for that. >I would like to understand what is the next step. If there is an issue with >implementing >the change, I hereby volunteer to implement it. Assuming I will make the >modification soon, is there a chance to get it into 1.1? > Gavin already got to it! Check out the latest beta (although I think he did it in b10). -Mark |
From: Rob B. <rob...@ve...> - 2003-06-16 17:48:03
|
Hello all, If you are using Hibernate with ID's as the primary keys (i.e. not using business data as keys / composite keys) should the database have referential integrity, and if so, how much? So: 1) If I have a parent child relationship, and in the DB the child has the parents key, should the RI of that relationship be enforced in the DB? 2) What about "business" referential integrity? If I were doing things the "old way" and using the business data as keys, the DB would perform lots of RI checking to make sure only "valid" rows could be inserted (rows where the primary key / foriegn key relationships were correct). Should these RI "rules" still be enforced in the database, or not? Later Rob |
From: Christian B. <c....@un...> - 2003-06-16 20:40:45
|
On 16 Jun (13:47), Rob Butler wrote: > 1) If I have a parent child relationship, and in the DB the child has the parents key, should the RI of that relationship be enforced in the DB? Of course, if you use the SchemaExport tool, Hibernate will even create the foreign key constraints for you. > 2) What about "business" referential integrity? If I were doing things the "old way" and using the business data as keys, the DB would perform lots of RI checking to make sure only "valid" rows could be inserted (rows where the primary key / foriegn key relationships were correct). Should these RI "rules" still be enforced in the database, or not? Don't do that. -- Christian Bauer c....@un... |
From: Daniel L. <dl...@va...> - 2003-08-22 04:56:12
|
Hello folks, We are looking for someone to assist us in evaluating the suitability of Hibernate as the persistence layer for our systems. The contractor can work from home. Its probably a week of work and pays $2000 USD. If you or anyone you know with hibernate experience is interested please send me a resume. Thank you, Dan |
From: St-Pierre P. <Phi...@lo...> - 2003-11-24 17:36:24
|
Hi everyone, I have an object named EntiteAffaire that has a collection (many-to-many relation with a composite-element) of coordinate. A coordin= ate can be a telephone, an address or an email. In the coordinate table, ther= e is a field named "KIND_COO" that tells me which kind of coordinate is in = the current row. Is it possible to specify a where clause for the set named entiteCoordonnees to get only one kind of coordinate in the set? This way= , I would be able to defined three sets, one for each kind of coordinate. I succeed to specify a where clause that map to a field of the collection table (utl.t_entite_coordonnee_l), but not to the coordinate table, which= is the end point of the relation. <class name=3D"com.iris.business.component.util.EntiteAffaire" schema=3D"UTL" table=3D"T_ENTITE_AFFAIRE"> <id name=3D"id" type=3D"string" column=3D"ID_EA" unsaved-value=3D"null"> <generator class=3D"com.iris.infrastructure.services.identification.UniqueIDProvider= Hiber nateImpl"/> </id> <set name=3D"entiteCoordonnees" schema=3D"UTL" table=3D"T_ENTITE_COORDONNEE_L" lazy=3D"true" cascade=3D"all" > <key column=3D"ID_EA"/> =09 <composite-element class=3D"com.iris.business.component.util.EntiteCoordonnee"> <property name=3D"utilisation" column=3D"REF_UTIL_COORD_EC" type=3D"string" not-null=3D"true"/> <many-to-one name=3D"coordonnee"=20 column=3D"ID_COO"=20 =09 class=3D"com.iris.business.component.util.CoordonneeUtil"=20 not-null=3D"true" =20 cascade=3D"all"/> </composite-element> </set> </class> SQL> desc utl.t_entite_affaire; Name Null? Type ----------------------------------------- -------- ---------------------------- ID_EA NOT NULL NUMBER(28) DATE_DERNIERE_MAJ NOT NULL TIMESTAMP(6) SQL> desc utl.t_entite_coordonnee_l; Name Null? Type ----------------------------------------- -------- ---------------------------- ID_COO NOT NULL NUMBER(28) ID_EA NOT NULL NUMBER(28) REF_UTIL_COORD_EC NOT NULL VARCHAR2(19) DATE_DERNIERE_MAJ NOT NULL TIMESTAMP(6) SQL> desc utl.t_coordonnee; Name Null? Type ----------------------------------------- -------- ---------------------------- ID_COO NOT NULL NUMBER(28) KIND_COO NOT NULL VARCHAR2(19) DATE_DERNIERE_MAJ NOT NULL TIMESTAMP(6) I hope that my question is clear enough... Philip St-Pierre > Loto-Qu=E9bec - Projet IRIS (Centre de livraison) Analyste-Programmeur > * phi...@lo... >=20 >=20 |
From: LAY O. <lay...@ya...> - 2004-04-29 07:21:54
|
--------------------------------- Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs |
From: Sai B. <sa...@mi...> - 2004-05-05 11:58:24
|
Buildfile: build.xml init: compile: [javac] Compiling 1 source file to E:\JAVA-SOFTWARE\J2EE-Projects\JDO - TRAILS\HIBERNATE - TRAIL S\TEST-4\obj Pls. see the Highlighted Red Colour statement. Pls. help me in w.r.to this Bug Rgds Sai run: [java] Entered into Load Customers.. class........... [java] log4j:WARN No appenders could be found for logger (net.sf.hibernate.cfg.Environment). [java] log4j:WARN Please initialize the log4j system properly. [java] net.sf.hibernate.JDBCException: SQLException occurred [java] at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3574) [java] at net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:223) [java] at mitoken.LoadCustomers.main(Unknown Source) [java] Caused by: java.sql.SQLException: Invalid column name 'COB_PMR_Personnel_Last_Name'. [java] at net.sourceforge.jtds.jdbc.SqlMessage.toSQLException(SqlMessage.java:85) [java] at net.sourceforge.jtds.jdbc.SQLWarningChain.addOrReturn(SQLWarningChain.java:9 9) [java] at net.sourceforge.jtds.jdbc.Tds.submitProcedure(Tds.java:616) [java] at net.sourceforge.jtds.jdbc.PreparedStatement_base.submitProcedure(PreparedSta temen t_base.java:195) [java] at net.sourceforge.jtds.jdbc.PreparedStatement_base.execute(PreparedStatement_b ase.j ava:174) [java] at net.sourceforge.jtds.jdbc.PreparedStatement_base.executeQuery(PreparedStatem ent_b ase.java:210) [java] at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:87) [java] at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:795) [java] at net.sf.hibernate.loader.Loader.doQuery(Loader.java:189) [java] at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader .java :133) [java] at net.sf.hibernate.loader.Loader.doList(Loader.java:950) [java] at net.sf.hibernate.loader.Loader.list(Loader.java:941) [java] at net.sf.hibernate.loader.CriteriaLoader.list(CriteriaLoader.java:118) [java] at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3571) [java] ... 2 more [java] Exception in thread "main" [java] Java Result: 1 all: BUILD SUCCESSFUL Total time: 15 seconds |
From: <dh...@ma...> - 2004-12-22 01:11:40
|
aGliZXJuYXRlLWRldmVso6zE+rrDo6ENCg0KCQ0KDQqhoaGhoaGhoaGhoaGhoaGh1sINCsDxo6EN CiAJCQkJDQoNCqGhoaGhoaGhoaGhoaGhoaFkaGoNCqGhoaGhoaGhoaGhoaGhoaFkaGpAbWFpbC5l cXluLmFjLmNuDQqhoaGhoaGhoaGhoaGhoaGhoaGhoTIwMDQtMTItMjINCg== |
From: Stephane Z. <ste...@gm...> - 2005-08-09 18:00:01
|
--=20 "Je d=E9teste les ordinateurs : ils font toujours ce que je dis, jamais ce que je veux !" |
From: Debidatta C. B. <Deb...@hc...> - 2006-03-23 05:47:29
|
Hi Friends, I am new to hibernate developemants, Actually i got a requirement where we need to autogenerated string ids = for our tables i.e. something if the first id is abc1 then next one will = be abc2 Can anyone help me out on this with some sample code. Thanks and regards, Debidatta |
From: Emmanuel B. <emm...@hi...> - 2006-03-23 07:10:59
|
Hi, You should consider going to the user forum http://forum.hibernate.org search for id generator. Debidatta Choudhury, Bangalore wrote: > Hi Friends, > I am new to hibernate developemants, > Actually i got a requirement where we need to autogenerated string ids for our tables i.e. something if the first id is abc1 then next one will be abc2 > Can anyone help me out on this with some sample code. > Thanks and regards, > Debidatta > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642 > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > > |
From: Steve W. <Sw...@ro...> - 2006-04-28 17:27:02
|
All, =20 I am using the XML Binding functionality of Hibernate 3.0 and need support for XML namespaces. I have added to support for a namespace attribute in the mapping file so one may have a mapping file that looks like: =20 <hibernate-mapping> <class entity-name=3D"SequenceNumber" table=3D"sequencenumber" node=3D"SequenceNumber" namespace=3D"http://roughbros.com/manufacture"> <id name=3D"sequenceNumber" type=3D"int" node=3D"@number"> <generator class=3D"assigned"/> </id> <property name=3D"description" node=3D"@description" = type=3D"string" column=3D"description"/> <set name=3D"PartNumberPatterns" node=3D"PartNumberPatterns" cascade=3D"all,delete-orphan" namespace=3D"http://roughbros.com/manufacture"> <key column=3D"sequenceNumber"/> <one-to-many entity-name=3D"PartNumberPattern"/> </set> </class> <class entity-name=3D"PartNumberPattern" = table=3D"seqnumberpartnumber" node=3D"PartNumberPattern" = namespace=3D"http://roughbros.com/manufacture"> <id name=3D"seqNumPartNumID" type=3D"int" unsaved-value=3D"0" node=3D"@seqNumPartNumID"> <generator class=3D"identity"/> </id> <property name=3D"pattern" node=3D"@pattern" type=3D"string" column=3D"partNumberPattern"/> </class> </hibernate-mapping> =20 Then the code was modified to create elements with namespaces when a namespace has been specified. The problem is that I have been unable to track down where the dom4J element is created for the <set> element. When the code is built with all the changes that I see needing to be made, the results are: =20 <SequenceNumber number=3D"100" description=3D"Steel Shop = Production for Shipment" xmlns=3D"http://roughbros.com/manufacture"> <PartNumberPatterns xmlns=3D""> <PartNumberPattern seqNumPartNumID=3D"1" pattern=3D"7.+"/> <PartNumberPattern seqNumPartNumID=3D"2" pattern=3D"S.+"/> </PartNumberPatterns> </SequenceNumber> =20 =20 Note the <set> element PartNumberPatterns has no namespace. Does someone know where the collection elements are created in the code? =20 =20 Thanks, =20 Steve |