RE: [Hibernate] Re: [Hibernate-commits] Hibernate/cirrus/hibernate/test FooBarTest.java,1.237,1.238 MultiTableTest.java,1.21,1.22
IBM JVM returns reflected methods in the reverse order. So if some test deosn't clean up after itself, it might fail on one JVM but not the other :) > -Original Message- > From: Max Rydahl Andersen [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 31 December 2002 12:16 AM > To: [EMAIL PROTECTED] > Subject: [Hibernate] Re: [Hibernate-commits] > Hibernate/cirrus/hibernate/test FooBarTest.java,1.237,1.238 > MultiTableTest.java,1.21,1.22 > > > Just curious, what is different in IBM JVM since the tests > did not run on it ? > > /max > > - Original Message - > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, December 30, 2002 2:11 PM > Subject: [Hibernate-commits] Hibernate/cirrus/hibernate/test > FooBarTest.java,1.237,1.238 MultiTableTest.java,1.21,1.22 > > > > Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test > > In directory sc8-pr-cvs1:/tmp/cvs-serv14135/cirrus/hibernate/test > > > > Modified Files: > > FooBarTest.java MultiTableTest.java > > Log Message: > > got tests working in IBM JVM > > > > > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___ > hibernate-devel mailing list [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > ** CAUTION - Disclaimer ** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS End of Disclaimer ** --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
RE: [Hibernate] Using CLOBs
The name of the type is "clob", and the expected property type is java.sql.Clob. Note that there are restrictions upon what you can do with Clobs (they can't be used outside of transaction, for example). You should also take notice of Hibernate.createClob(). > -Original Message- > From: Ugo Cei [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 31 December 2002 1:06 AM > To: [EMAIL PROTECTED] > Subject: [Hibernate] Using CLOBs > > > Hi people, > > does anybody have some documentation and/or samples re using CLOBs in > the current CVS version? > > Do I have to declare 'type="clob"' in my mapping file? Do my class > attributes have to be String's or java.sql.Clob's or something else? > > Since I need this feature, I'd like to help testing and maybe fixing > them, in particular with Oracle, but I need a couple of hints just to > get me started. > > Thanks in Advance, > > Ugo > > -- > Ugo Cei - http://www.beblogging.com/blog/ > > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___ > hibernate-devel mailing list [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > ** CAUTION - Disclaimer ** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS End of Disclaimer ** --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
RE: [Hibernate] Tools road map
My comments are now added in /italics/ on the page itself... > -Original Message- > From: Max Rydahl Andersen [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 31 December 2002 7:16 AM > To: [EMAIL PROTECTED] > Subject: [Hibernate] Tools road map > > > I've been so "insane" to plot down a "road-map" for the Tools > in Hibernate...it actually turned out to include more than an > road-map... So please take a look at > http://hibernate.bluemars.net/52.html > > And please provide any comment you see fit :) > > /max > > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___ > hibernate-devel mailing list [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > ** CAUTION - Disclaimer ** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS End of Disclaimer ** --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] pre-Codegen enhancements
Hi! Just letting you know that I now has implemented support for the attribute in Hibernate hbm.xml. My local codegenerator does now support the following tags. "description" - Text that will be included as an javadoc comment "extends" - name of the class the entity class should extend. Is ignored in subclass and joined-subclass. "implements" - name of an interface the entity class should implement. Can be repeated N times. "generated-class" - name that the codegenerator should use instead of the actual mapped class. This class would then be extended by the actual mapped class (done by the user) A fullblown example could be as follows: codegen.test.AbstractPersistent codegen.test.IVersionable codegen.test.IAuditable codegen.test.AutoPerson AutoPerson is a simple class, which illustrates the possibilities of the Hibernate meta tag. @author Zim Zala Bim A javadoc comment for the field name... And this currently gives the following code: package codegen.test; import java.io.Serializable; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; /** * AutoPerson is a simple class, which illustrates the possibilities of the Hibernate meta tag. * @author Zim Zala Bim */ abstract public class AutoPerson extends codegen.test.AbstractPersistent implements Serializable, codegen.test.IVersionable, codegen.test.IAuditable { /** identifier field */ private String id; /** * A javadoc comment for the field name... */ private String name; /** nullable persistent field */ private codegen.test.User myUser; /** full constructor */ public AutoPerson(java.lang.String id, java.lang.String name, codegen.test.User myUser) { this.id = id; this.name = name; this.myUser = myUser; } /** default constructor */ public AutoPerson() { } /** minimal constructor */ public AutoPerson(java.lang.String id) { this.id = id; } public java.lang.String getId() { return this.id; } public void setId(java.lang.String id) { this.id = id; } public java.lang.String getName() { return this.name; } public void setName(java.lang.String name) { this.name = name; } public codegen.test.User getMyUser() { return this.myUser; } public void setMyUser(codegen.test.User myUser) { this.myUser = myUser; } public String toString() { return ToStringBuilder.reflectionToString(this); } public boolean equals(Object other) { if ( !(other instanceof AutoPerson) ) return false; AutoPerson castOther = (AutoPerson) other; return new EqualsBuilder().append(this.id, castOther.id).isEquals(); } public int hashCode() { return new HashCodeBuilder().append(id).toHashCode(); } } I'll work a little more with regards to adding support for these meta-tags for composites, and all the collection types (if at all reasonable) + a wiki page describing the capabilities of the codegenerator. Hope you like it :) I welcome any comments :) /max p.s. A side question: Does anyone have an "Good Code Example" for which code you would like to be generated for add and remove methods for bi-directional collections ? --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
RE: [Hibernate] Hibernate XDoclet Task
> * Is there any chance to add predefined queries to the > generated mapping? Ummm, I thought theres was a @hibernate.query tag > * Is there any chance to generate the bean-pattern > (setXXX(), getXXX() >and especially the addXXX(Child)/setXXX(Parent)) methods of the >java-bean class? I really do not like to write them down... If you want that kind of thing, its probably better to go with CodeGenerator rather than XDoclet. Hibernate is stubbornly "property-centric" rather than "field-centric" and most people think this is a feature. It would cut against the grain to let you mark up persistent fields and have the get/set pair be generated. (Anyway, I just let Eclipse generate my get/set pair.) ** CAUTION - Disclaimer ** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS End of Disclaimer ** --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
RE: [Hibernate] CodeGenerator
> > > > > > JavaDoc comment for getBar() > > > > java.lang.Object > > > > . > > But this one ? Isn't this a bit "cloudy" > If I understand this correctly you want that if "java-type" > is provided the codegenerator should use that type instead of > the type specified in the propertyJust curious, when is > that usefull ? For example: currently generates: public java.sql.Date getDate(); what if you wanted public java.util.Date getDate(); Hey, I just thought of another that would be *very* useful: protected JavaDoc comment for getBar() surprised I didn't think of that before ** CAUTION - Disclaimer ** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS End of Disclaimer ** --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] buglet in 1.2.1
For the new logging stuff I added something like: Log log = LogFactory.getLog( Type.class.getPackage().getName() ); Turns out that getPackage() is allowed to return null if the JVM can't be bothered implementing it. And some (but not all) versions of the IBM JVM do just that. So there is a version of the IBM JVM for which Hibernate 1.2.1 will die *instantly* with an NPE :( Not the version I tested on before releasing, however! The fix is to replace Type.class.getPackage().getName() with "cirrus.hibernate.type" ** CAUTION - Disclaimer ** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS End of Disclaimer ** --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] [1.2.1] Minor glitch in packaging
The hibernate-1.2.1.tar.gz archive unpacks to a directory called hibernate-1.2. Even though it's only a point release, this might casuse some confusion if people inadvertently overwrite the old version. The directory should be called hibernate-1.2.1 (IMHO of course). Ugo -- Ugo Cei - http://www.beblogging.com/blog/ --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Re: [Hibernate-commits] Hibernate/cirrus/hibernate/test FooBarTest.java,1.237,1.238 MultiTableTest.java,1.21,1.22
That's a mean one :) I'll remember that when my reflective code starts trashing on IBM's :) /max - Original Message - From: "Gavin King" <[EMAIL PROTECTED]> To: "Max Rydahl Andersen" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, December 31, 2002 12:37 AM Subject: RE: [Hibernate] Re: [Hibernate-commits] Hibernate/cirrus/hibernate/test FooBarTest.java,1.237,1.238 MultiTableTest.java,1.21,1.22 IBM JVM returns reflected methods in the reverse order. So if some test deosn't clean up after itself, it might fail on one JVM but not the other :) > -Original Message- > From: Max Rydahl Andersen [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 31 December 2002 12:16 AM > To: [EMAIL PROTECTED] > Subject: [Hibernate] Re: [Hibernate-commits] > Hibernate/cirrus/hibernate/test FooBarTest.java,1.237,1.238 > MultiTableTest.java,1.21,1.22 > > > Just curious, what is different in IBM JVM since the tests > did not run on it ? > > /max > > - Original Message - > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, December 30, 2002 2:11 PM > Subject: [Hibernate-commits] Hibernate/cirrus/hibernate/test > FooBarTest.java,1.237,1.238 MultiTableTest.java,1.21,1.22 > > > > Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test > > In directory sc8-pr-cvs1:/tmp/cvs-serv14135/cirrus/hibernate/test > > > > Modified Files: > > FooBarTest.java MultiTableTest.java > > Log Message: > > got tests working in IBM JVM > > > > > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___ > hibernate-devel mailing list [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > ** CAUTION - Disclaimer ** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS End of Disclaimer ** --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] ms access dialect problem
well g., thanks for support, but I'm getting nowhere. I finally found the keyword for generating autoincrement column via JDBC for access, "counter", but still does not seem to work in this context. public String getIdentityColumnString() { return " counter "; } I tried all versions from other dialects in vain. moreover, passing to 1.2.1, updates of schema do not work any more (it works fine in 1.2): 11:22:09,773 DEBUG DriverManagerConnectionProvider:89 - Created connection to: jdbc:izmado:IzmDllPath=K:\cvs_out\teamwork\html\WEB-INF\lib\IzmJniAdo.dll;IzmRoyaltyFree=*;Provider=MSDASQL; Driver={Microsoft Access Driver (*.mdb)};Dbq=k:\cvs_out\teamwork\data\teamwork_ol.mdb, Isolation Level: 2 com.inzoom.adojni.ComException: Object or provider is not capable of performing requested operation. in ADODB.Connection code=0 Type=1 at com.inzoom.ado.Connection.jniOpenSchema(Native Method) at com.inzoom.ado.Connection.openSchema(Connection.java:154) at com.inzoom.jdbcado.DatabaseMetaData.openAdoSchema(DatabaseMetaData.java:124) at com.inzoom.jdbcado.DatabaseMetaData.getFKs(DatabaseMetaData.java:1243) at com.inzoom.jdbcado.DatabaseMetaData.getImportedKeys(DatabaseMetaData.java:1301) at cirrus.hibernate.tools.updater.JdbcTableInfo.initForeignKeys(JdbcTableInfo.java:29) at cirrus.hibernate.tools.updater.JdbcDatabaseInfo.initForeignKeys(JdbcDatabaseInfo.java:84) at cirrus.hibernate.tools.updater.JdbcDatabaseInfo.(JdbcDatabaseInfo.java:20) at cirrus.hibernate.tools.SchemaUpdater.execute(SchemaUpdater.java:83) at com.twproject.persistence.GenerateUpdateScript.main(GenerateUpdateScript.java:25) this (and all the rest) works fine on e.g. mysql. Maybe I am hitting on intrinsic limitations, of the driver and/or the db :-( bye --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
RE: [Hibernate] Hibernate XDoclet Task
--- Gavin King <[EMAIL PROTECTED]> wrote: > > > * Is there any chance to add predefined queries > to the > > generated mapping? > > Ummm, I thought theres was a @hibernate.query tag > > > * Is there any chance to generate the > bean-pattern > > (setXXX(), getXXX() > >and especially the > addXXX(Child)/setXXX(Parent)) methods of the > >java-bean class? I really do not like to write > them down... Yes, xdoclet can be tricked to do this. But this feature is not implemented - though nobody prevents you from hacking templates. But it seems to be not very usefull for me. XDoclet can generate derived class for you, and all kinds of methods in this class. But this way you would lose main advantage of using hibernate vs entity beans - to get rid of paralel class hierarchies... > (Anyway, I just let Eclipse generate my get/set > pair.) I do this with jEdit. Just wrote small velocity template... regards, = Konstantin Priblouda ( ko5tik )Freelance Software developer < http://www.pribluda.de > < play java games -> http://www.yook.de > < render charts online -> http://www.pribluda.de/povray/ > __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
RE: [Hibernate] Combining 2 tables into 1 object
Have a look in the Patterns section of the wiki at the "Delegate" pattern (and the discussion). > -Original Message- > From: Raible, Matt [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 31 December 2002 3:56 AM > To: '[EMAIL PROTECTED]' > Subject: [Hibernate] Combining 2 tables into 1 object > > > I have two tables that are very simple > > code_category > - > category_id > category_name > > code_reference > - > code_id > category_id > code_desc > > Is it possible to combine these into one object in Hibernate? > All I've read seem to indicate that these should be separate > objects. Is it best to separate them, or combine them? > > Thanks, > > Matt > > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___ > hibernate-devel mailing list [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > ** CAUTION - Disclaimer ** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS End of Disclaimer ** --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] Hibernate XDoclet Task
Hi, as a newbie using XDoclet (today it's working for the very first time) i have two questions: * Is there any chance to add predefined queries to the generated mapping? * Is there any chance to generate the bean-pattern (setXXX(), getXXX() and especially the addXXX(Child)/setXXX(Parent)) methods of the java-bean class? I really do not like to write them down... Regards, Ralf --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel