You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(32) |
Jun
(175) |
Jul
(209) |
Aug
(302) |
Sep
(287) |
Oct
(339) |
Nov
(314) |
Dec
(329) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(479) |
Feb
(389) |
Mar
(599) |
Apr
(307) |
May
(390) |
Jun
(300) |
Jul
(410) |
Aug
(458) |
Sep
(299) |
Oct
(315) |
Nov
(363) |
Dec
(529) |
2005 |
Jan
(568) |
Feb
(434) |
Mar
(1004) |
Apr
(823) |
May
(767) |
Jun
(763) |
Jul
(854) |
Aug
(862) |
Sep
(560) |
Oct
(853) |
Nov
(763) |
Dec
(731) |
2006 |
Jan
(776) |
Feb
(608) |
Mar
(657) |
Apr
(424) |
May
(559) |
Jun
(440) |
Jul
(448) |
Aug
(58) |
Sep
|
Oct
(17) |
Nov
(16) |
Dec
(8) |
2007 |
Jan
(1) |
Feb
(8) |
Mar
(2) |
Apr
(5) |
May
(3) |
Jun
(3) |
Jul
(3) |
Aug
(16) |
Sep
(10) |
Oct
(4) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(8) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: <leg...@at...> - 2003-12-08 12:24:41
|
The following comment has been added to this issue: Author: Hunter Kelly Created: Mon, 8 Dec 2003 6:24 AM Body: It does, I swear! I'll have to change the test to be a normal one-to-one mapping without the property ref, but it does work. As a quick and dirty, you can run it in th 2.0.3 tree (sax complains about property-ref), but the insert does work correctly. I'll update the example to be a normal (ie same id) one-to-one. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-531 Summary: One-To-One mappings with int/native ids don't work properly Type: Bug Status: Closed Priority: Critical Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Mon, 8 Dec 2003 4:49 AM Updated: Mon, 8 Dec 2003 6:24 AM Environment: RedHat Linux 9.0 MySQL 4.0.14-standard Latest Hibernate CVS tree Description: I have a one to one mapping in a class, Thing, that maps to IntThing and UUIDThing. IntThing and UUIDThing both define a many-to-one mapping back to Thing. Int thing uses "native" generator for id. UUID uses "uuid.hex" generator for id. I would have thought they'd behave the same, but they don't. I've built a truth table for each, where I changed the values of the "constrained" attribute on the one-to-one mapping and the "not-null" attribute on the many-to-one mapping. For UUID thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null | | true | failed | sucess ------------------------------------------------------- Not-Null | false | success | success ------------------------------------------------------- For Int thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null| | true | failed | failed ------------------------------------------------------- Not-Null| | false | success | failed ------------------------------------------------------- The above chart shows that regardless of what constrained is set to, you can't have a one-to-one mapping to an entity with an int id type that has a not-null constraint back to the parent. I'll attach the files now - to compile and run I just made a copy of the "eg" target in Hibernate's build.xml, uncommented the lines in hibernate.properties relevant to MySQL and changed the database name. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-08 12:07:41
|
The following comment has been added to this issue: Author: Gavin King Created: Mon, 8 Dec 2003 6:07 AM Body: It didn't work in 2.0.3! At least, I don't see how it *could* have. You are mistaken, I think... --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-531 Summary: One-To-One mappings with int/native ids don't work properly Type: Bug Status: Closed Priority: Critical Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Mon, 8 Dec 2003 4:49 AM Updated: Mon, 8 Dec 2003 6:07 AM Environment: RedHat Linux 9.0 MySQL 4.0.14-standard Latest Hibernate CVS tree Description: I have a one to one mapping in a class, Thing, that maps to IntThing and UUIDThing. IntThing and UUIDThing both define a many-to-one mapping back to Thing. Int thing uses "native" generator for id. UUID uses "uuid.hex" generator for id. I would have thought they'd behave the same, but they don't. I've built a truth table for each, where I changed the values of the "constrained" attribute on the one-to-one mapping and the "not-null" attribute on the many-to-one mapping. For UUID thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null | | true | failed | sucess ------------------------------------------------------- Not-Null | false | success | success ------------------------------------------------------- For Int thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null| | true | failed | failed ------------------------------------------------------- Not-Null| | false | success | failed ------------------------------------------------------- The above chart shows that regardless of what constrained is set to, you can't have a one-to-one mapping to an entity with an int id type that has a not-null constraint back to the parent. I'll attach the files now - to compile and run I just made a copy of the "eg" target in Hibernate's build.xml, uncommented the lines in hibernate.properties relevant to MySQL and changed the database name. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-08 11:56:41
|
The following comment has been added to this issue: Author: Hunter Kelly Created: Mon, 8 Dec 2003 5:55 AM Body: Err, I was typing that last comment as your previous comment came in. Didn't mean a direct contradiction of what you'd just said - but it did actually work in 2.0.3. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-531 Summary: One-To-One mappings with int/native ids don't work properly Type: Bug Status: Closed Priority: Critical Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Mon, 8 Dec 2003 4:49 AM Updated: Mon, 8 Dec 2003 5:55 AM Environment: RedHat Linux 9.0 MySQL 4.0.14-standard Latest Hibernate CVS tree Description: I have a one to one mapping in a class, Thing, that maps to IntThing and UUIDThing. IntThing and UUIDThing both define a many-to-one mapping back to Thing. Int thing uses "native" generator for id. UUID uses "uuid.hex" generator for id. I would have thought they'd behave the same, but they don't. I've built a truth table for each, where I changed the values of the "constrained" attribute on the one-to-one mapping and the "not-null" attribute on the many-to-one mapping. For UUID thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null | | true | failed | sucess ------------------------------------------------------- Not-Null | false | success | success ------------------------------------------------------- For Int thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null| | true | failed | failed ------------------------------------------------------- Not-Null| | false | success | failed ------------------------------------------------------- The above chart shows that regardless of what constrained is set to, you can't have a one-to-one mapping to an entity with an int id type that has a not-null constraint back to the parent. I'll attach the files now - to compile and run I just made a copy of the "eg" target in Hibernate's build.xml, uncommented the lines in hibernate.properties relevant to MySQL and changed the database name. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-08 11:54:41
|
The following comment has been added to this issue: Author: Hunter Kelly Created: Mon, 8 Dec 2003 5:53 AM Body: I've just tested this in Hibernate-2.0.3 and it works. Something that works in one major release, and not in the next, is definately a bug. I actually first came across the issue last week when doing the upgrade from 2.0.3 to 2.1rc1. I don't mean to sound tetchy, I'm just trying to be helpful. I work on a real commercial product, and Hibernate has enabled us to do a tremendous amount in a very short period of time - I think it is, hands down, one of the best pieces of software that I've used. If there is something else I can do to help sort this out, please let me know. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-531 Summary: One-To-One mappings with int/native ids don't work properly Type: Bug Status: Closed Priority: Critical Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Mon, 8 Dec 2003 4:49 AM Updated: Mon, 8 Dec 2003 5:53 AM Environment: RedHat Linux 9.0 MySQL 4.0.14-standard Latest Hibernate CVS tree Description: I have a one to one mapping in a class, Thing, that maps to IntThing and UUIDThing. IntThing and UUIDThing both define a many-to-one mapping back to Thing. Int thing uses "native" generator for id. UUID uses "uuid.hex" generator for id. I would have thought they'd behave the same, but they don't. I've built a truth table for each, where I changed the values of the "constrained" attribute on the one-to-one mapping and the "not-null" attribute on the many-to-one mapping. For UUID thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null | | true | failed | sucess ------------------------------------------------------- Not-Null | false | success | success ------------------------------------------------------- For Int thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null| | true | failed | failed ------------------------------------------------------- Not-Null| | false | success | failed ------------------------------------------------------- The above chart shows that regardless of what constrained is set to, you can't have a one-to-one mapping to an entity with an int id type that has a not-null constraint back to the parent. I'll attach the files now - to compile and run I just made a copy of the "eg" target in Hibernate's build.xml, uncommented the lines in hibernate.properties relevant to MySQL and changed the database name. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-08 11:47:41
|
The following comment has been added to this issue: Author: Gavin King Created: Mon, 8 Dec 2003 5:47 AM Body: I agree it should be added to the FAQ. There are, however, some mentions in the forum. It is certainly not a bug. The Session does write-behind for all inserts except identity column inserts, since it is impossible in this special case. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-531 Summary: One-To-One mappings with int/native ids don't work properly Type: Bug Status: Closed Priority: Critical Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Mon, 8 Dec 2003 4:49 AM Updated: Mon, 8 Dec 2003 5:47 AM Environment: RedHat Linux 9.0 MySQL 4.0.14-standard Latest Hibernate CVS tree Description: I have a one to one mapping in a class, Thing, that maps to IntThing and UUIDThing. IntThing and UUIDThing both define a many-to-one mapping back to Thing. Int thing uses "native" generator for id. UUID uses "uuid.hex" generator for id. I would have thought they'd behave the same, but they don't. I've built a truth table for each, where I changed the values of the "constrained" attribute on the one-to-one mapping and the "not-null" attribute on the many-to-one mapping. For UUID thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null | | true | failed | sucess ------------------------------------------------------- Not-Null | false | success | success ------------------------------------------------------- For Int thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null| | true | failed | failed ------------------------------------------------------- Not-Null| | false | success | failed ------------------------------------------------------- The above chart shows that regardless of what constrained is set to, you can't have a one-to-one mapping to an entity with an int id type that has a not-null constraint back to the parent. I'll attach the files now - to compile and run I just made a copy of the "eg" target in Hibernate's build.xml, uncommented the lines in hibernate.properties relevant to MySQL and changed the database name. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-08 11:37:41
|
The following comment has been added to this issue: Author: Hunter Kelly Created: Mon, 8 Dec 2003 5:37 AM Body: Is there a list where some of these gotcha's are listed? I've never seen anything about it in the documentation or the FAQs. And searching on the text of the error message in both Google and the forums yielded very little. I do not think that it is very well known. I don't understand, though, why was this rejected? Isn't this considered a bug? At the very least the error message should indicate where the problem is - in the fact that something has an int id and there is some strangeness there. H --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-531 Summary: One-To-One mappings with int/native ids don't work properly Type: Bug Status: Closed Priority: Critical Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Mon, 8 Dec 2003 4:49 AM Updated: Mon, 8 Dec 2003 5:37 AM Environment: RedHat Linux 9.0 MySQL 4.0.14-standard Latest Hibernate CVS tree Description: I have a one to one mapping in a class, Thing, that maps to IntThing and UUIDThing. IntThing and UUIDThing both define a many-to-one mapping back to Thing. Int thing uses "native" generator for id. UUID uses "uuid.hex" generator for id. I would have thought they'd behave the same, but they don't. I've built a truth table for each, where I changed the values of the "constrained" attribute on the one-to-one mapping and the "not-null" attribute on the many-to-one mapping. For UUID thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null | | true | failed | sucess ------------------------------------------------------- Not-Null | false | success | success ------------------------------------------------------- For Int thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null| | true | failed | failed ------------------------------------------------------- Not-Null| | false | success | failed ------------------------------------------------------- The above chart shows that regardless of what constrained is set to, you can't have a one-to-one mapping to an entity with an int id type that has a not-null constraint back to the parent. I'll attach the files now - to compile and run I just made a copy of the "eg" target in Hibernate's build.xml, uncommented the lines in hibernate.properties relevant to MySQL and changed the database name. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-08 11:12:41
|
The following issue has been updated: Updater: Hunter Kelly (mailto:re...@ei...) Date: Mon, 8 Dec 2003 5:11 AM Changes: Attachment changed to thing.sql --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-531 Summary: One-To-One mappings with int/native ids don't work properly Type: Bug Status: Closed Priority: Critical Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Mon, 8 Dec 2003 4:49 AM Updated: Mon, 8 Dec 2003 5:11 AM Environment: RedHat Linux 9.0 MySQL 4.0.14-standard Latest Hibernate CVS tree Description: I have a one to one mapping in a class, Thing, that maps to IntThing and UUIDThing. IntThing and UUIDThing both define a many-to-one mapping back to Thing. Int thing uses "native" generator for id. UUID uses "uuid.hex" generator for id. I would have thought they'd behave the same, but they don't. I've built a truth table for each, where I changed the values of the "constrained" attribute on the one-to-one mapping and the "not-null" attribute on the many-to-one mapping. For UUID thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null | | true | failed | sucess ------------------------------------------------------- Not-Null | false | success | success ------------------------------------------------------- For Int thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null| | true | failed | failed ------------------------------------------------------- Not-Null| | false | success | failed ------------------------------------------------------- The above chart shows that regardless of what constrained is set to, you can't have a one-to-one mapping to an entity with an int id type that has a not-null constraint back to the parent. I'll attach the files now - to compile and run I just made a copy of the "eg" target in Hibernate's build.xml, uncommented the lines in hibernate.properties relevant to MySQL and changed the database name. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-08 11:03:41
|
Message: The following issue has been closed. Resolver: Gavin King Date: Mon, 8 Dec 2003 5:03 AM It is well known that identity id generation behaves slightly differently to other strategies and that mixing identity with other strategies has some hiccups. You might need to disable cascade save and use an explicit flush to force the non-identity object into the database first. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-531 Summary: One-To-One mappings with int/native ids don't work properly Type: Bug Status: Closed Priority: Critical Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Mon, 8 Dec 2003 4:49 AM Updated: Mon, 8 Dec 2003 5:03 AM Environment: RedHat Linux 9.0 MySQL 4.0.14-standard Latest Hibernate CVS tree Description: I have a one to one mapping in a class, Thing, that maps to IntThing and UUIDThing. IntThing and UUIDThing both define a many-to-one mapping back to Thing. Int thing uses "native" generator for id. UUID uses "uuid.hex" generator for id. I would have thought they'd behave the same, but they don't. I've built a truth table for each, where I changed the values of the "constrained" attribute on the one-to-one mapping and the "not-null" attribute on the many-to-one mapping. For UUID thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null | | true | failed | sucess ------------------------------------------------------- Not-Null | false | success | success ------------------------------------------------------- For Int thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null| | true | failed | failed ------------------------------------------------------- Not-Null| | false | success | failed ------------------------------------------------------- The above chart shows that regardless of what constrained is set to, you can't have a one-to-one mapping to an entity with an int id type that has a not-null constraint back to the parent. I'll attach the files now - to compile and run I just made a copy of the "eg" target in Hibernate's build.xml, uncommented the lines in hibernate.properties relevant to MySQL and changed the database name. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-08 10:58:41
|
The following issue has been updated: Updater: Hunter Kelly (mailto:re...@ei...) Date: Mon, 8 Dec 2003 4:56 AM Changes: Attachment changed to Thing.java --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-531 Summary: One-To-One mappings with int/native ids don't work properly Type: Bug Status: Unassigned Priority: Critical Project: Hibernate2 Components: core Versions: 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Mon, 8 Dec 2003 4:49 AM Updated: Mon, 8 Dec 2003 4:56 AM Environment: RedHat Linux 9.0 MySQL 4.0.14-standard Latest Hibernate CVS tree Description: I have a one to one mapping in a class, Thing, that maps to IntThing and UUIDThing. IntThing and UUIDThing both define a many-to-one mapping back to Thing. Int thing uses "native" generator for id. UUID uses "uuid.hex" generator for id. I would have thought they'd behave the same, but they don't. I've built a truth table for each, where I changed the values of the "constrained" attribute on the one-to-one mapping and the "not-null" attribute on the many-to-one mapping. For UUID thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null | | true | failed | sucess ------------------------------------------------------- Not-Null | false | success | success ------------------------------------------------------- For Int thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null| | true | failed | failed ------------------------------------------------------- Not-Null| | false | success | failed ------------------------------------------------------- The above chart shows that regardless of what constrained is set to, you can't have a one-to-one mapping to an entity with an int id type that has a not-null constraint back to the parent. I'll attach the files now - to compile and run I just made a copy of the "eg" target in Hibernate's build.xml, uncommented the lines in hibernate.properties relevant to MySQL and changed the database name. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-08 10:56:41
|
The following comment has been added to this issue: Author: Hunter Kelly Created: Mon, 8 Dec 2003 4:56 AM Body: Here is the output when run: cd /home/retnuh/stuff/hibernate/cvs/hibernate-2.1/eg1/test/ ant -find build.xml -emacs eg1 Searching for build.xml ... Buildfile: /home/retnuh/stuff/hibernate/cvs/hibernate-2.1/build.xml Could not load definitions from resource clovertasks. It could not be found. eg1: Compiling 1 source file to /home/retnuh/stuff/hibernate/cvs/hibernate-2.1/eg1 remember to place your JDBC driver in the lib directory 08-Dec-2003 10:55:30 net.sf.hibernate.cfg.Environment <clinit> INFO: Hibernate 2.1 rc1 08-Dec-2003 10:55:30 net.sf.hibernate.cfg.Environment <clinit> INFO: loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=com.mysql.jdbc.Driver, hibernate.cglib.use_reflection_optimizer=true, hibernate.cache.provider_class=net.sf.hibernate.cache.HashtableCacheProvider, hibernate.max_fetch_depth=1, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.jdbc.use_streams_for_binary=true, hibernate.jdbc.batch_size=0, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.proxool.pool_alias=pool1, hibernate.connection.username=root, hibernate.connection.url=jdbc:mysql:///thing, hibernate.connection.password=root, hibernate.connection.pool_size=1} 08-Dec-2003 10:55:30 net.sf.hibernate.cfg.Environment <clinit> INFO: using java.io streams to persist binary types 08-Dec-2003 10:55:30 net.sf.hibernate.cfg.Environment <clinit> INFO: using CGLIB reflection optimizer 08-Dec-2003 10:55:30 net.sf.hibernate.cfg.Configuration configure INFO: configuring from resource: /hibernate.cfg.xml 08-Dec-2003 10:55:30 net.sf.hibernate.cfg.Configuration getConfigurationInputStream INFO: Configuration resource: /hibernate.cfg.xml 08-Dec-2003 10:55:30 net.sf.hibernate.cfg.Configuration addResource INFO: Mapping resource: Thing.hbm.xml 08-Dec-2003 10:55:30 net.sf.hibernate.cfg.Binder bindRootClass INFO: Mapping class: test.Thing -> thing 08-Dec-2003 10:55:30 net.sf.hibernate.cfg.Binder bindRootClass INFO: Mapping class: test.UUIDThing -> uuidthing 08-Dec-2003 10:55:30 net.sf.hibernate.cfg.Binder bindRootClass INFO: Mapping class: test.IntThing -> otherthing 08-Dec-2003 10:55:30 net.sf.hibernate.cfg.Configuration doConfigure INFO: Configured SessionFactory: null 08-Dec-2003 10:55:30 net.sf.hibernate.cfg.Configuration secondPassCompile INFO: processing one-to-many association mappings 08-Dec-2003 10:55:30 net.sf.hibernate.cfg.Configuration secondPassCompile INFO: processing one-to-one association property references 08-Dec-2003 10:55:30 net.sf.hibernate.cfg.Configuration secondPassCompile INFO: processing foreign key constraints 08-Dec-2003 10:55:31 net.sf.hibernate.dialect.Dialect <init> INFO: Using dialect: net.sf.hibernate.dialect.MySQLDialect 08-Dec-2003 10:55:31 net.sf.hibernate.cfg.SettingsFactory buildSettings INFO: Maximim outer join fetch depth: 1 08-Dec-2003 10:55:31 net.sf.hibernate.cfg.SettingsFactory buildSettings INFO: Use outer join fetching: true 08-Dec-2003 10:55:31 net.sf.hibernate.connection.DriverManagerConnectionProvider configure INFO: Using Hibernate built-in connection pool (not for production use!) 08-Dec-2003 10:55:31 net.sf.hibernate.connection.DriverManagerConnectionProvider configure INFO: Hibernate connection pool size: 1 08-Dec-2003 10:55:31 net.sf.hibernate.connection.DriverManagerConnectionProvider configure INFO: using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql:///thing 08-Dec-2003 10:55:31 net.sf.hibernate.connection.DriverManagerConnectionProvider configure INFO: connection properties: {user=root, password=root} 08-Dec-2003 10:55:31 net.sf.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup INFO: No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended) 08-Dec-2003 10:55:31 net.sf.hibernate.cfg.SettingsFactory buildSettings INFO: Use scrollable result sets: true 08-Dec-2003 10:55:31 net.sf.hibernate.cfg.SettingsFactory buildSettings INFO: echoing all SQL to stdout 08-Dec-2003 10:55:31 net.sf.hibernate.cfg.SettingsFactory buildSettings INFO: Query language substitutions: {no='N', true=1, yes='Y', false=0} 08-Dec-2003 10:55:31 net.sf.hibernate.cfg.SettingsFactory buildSettings INFO: cache provider: net.sf.hibernate.cache.HashtableCacheProvider 08-Dec-2003 10:55:31 net.sf.hibernate.cfg.Configuration configureCaches INFO: instantiating and configuring caches 08-Dec-2003 10:55:31 net.sf.hibernate.impl.SessionFactoryImpl <init> INFO: building session factory 08-Dec-2003 10:55:32 net.sf.hibernate.impl.SessionFactoryObjectFactory addInstance INFO: no JNDI name configured Exception in thread "main" net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: net.sf.hibernate.persister.EntityPersister.thing at net.sf.hibernate.impl.SessionImpl.checkNullability(SessionImpl.java:1208) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:873) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:817) at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:737) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:717) at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1319) at net.sf.hibernate.engine.Cascades$4.cascade(Cascades.java:114) at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:436) at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:503) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:892) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:817) at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:740) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:717) at test.IntVsUUIDOneToOneTest.main(IntVsUUIDOneToOneTest.java:27) Java Result: 1 for more examples, download the hibernate-examples package BUILD SUCCESSFUL Total time: 4 seconds Compilation finished at Mon Dec 8 10:55:32 --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-531 Summary: One-To-One mappings with int/native ids don't work properly Type: Bug Status: Unassigned Priority: Critical Project: Hibernate2 Components: core Versions: 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Mon, 8 Dec 2003 4:49 AM Updated: Mon, 8 Dec 2003 4:56 AM Environment: RedHat Linux 9.0 MySQL 4.0.14-standard Latest Hibernate CVS tree Description: I have a one to one mapping in a class, Thing, that maps to IntThing and UUIDThing. IntThing and UUIDThing both define a many-to-one mapping back to Thing. Int thing uses "native" generator for id. UUID uses "uuid.hex" generator for id. I would have thought they'd behave the same, but they don't. I've built a truth table for each, where I changed the values of the "constrained" attribute on the one-to-one mapping and the "not-null" attribute on the many-to-one mapping. For UUID thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null | | true | failed | sucess ------------------------------------------------------- Not-Null | false | success | success ------------------------------------------------------- For Int thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null| | true | failed | failed ------------------------------------------------------- Not-Null| | false | success | failed ------------------------------------------------------- The above chart shows that regardless of what constrained is set to, you can't have a one-to-one mapping to an entity with an int id type that has a not-null constraint back to the parent. I'll attach the files now - to compile and run I just made a copy of the "eg" target in Hibernate's build.xml, uncommented the lines in hibernate.properties relevant to MySQL and changed the database name. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-08 10:53:41
|
The following issue has been updated: Updater: Hunter Kelly (mailto:re...@ei...) Date: Mon, 8 Dec 2003 4:53 AM Comment: This is hibernate 2.1's build file, with the target "eg1" added. Changes: Attachment changed to build.xml --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-531 Summary: One-To-One mappings with int/native ids don't work properly Type: Bug Status: Unassigned Priority: Critical Project: Hibernate2 Components: core Versions: 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Mon, 8 Dec 2003 4:49 AM Updated: Mon, 8 Dec 2003 4:53 AM Environment: RedHat Linux 9.0 MySQL 4.0.14-standard Latest Hibernate CVS tree Description: I have a one to one mapping in a class, Thing, that maps to IntThing and UUIDThing. IntThing and UUIDThing both define a many-to-one mapping back to Thing. Int thing uses "native" generator for id. UUID uses "uuid.hex" generator for id. I would have thought they'd behave the same, but they don't. I've built a truth table for each, where I changed the values of the "constrained" attribute on the one-to-one mapping and the "not-null" attribute on the many-to-one mapping. For UUID thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null | | true | failed | sucess ------------------------------------------------------- Not-Null | false | success | success ------------------------------------------------------- For Int thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null| | true | failed | failed ------------------------------------------------------- Not-Null| | false | success | failed ------------------------------------------------------- The above chart shows that regardless of what constrained is set to, you can't have a one-to-one mapping to an entity with an int id type that has a not-null constraint back to the parent. I'll attach the files now - to compile and run I just made a copy of the "eg" target in Hibernate's build.xml, uncommented the lines in hibernate.properties relevant to MySQL and changed the database name. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-08 10:53:41
|
The following issue has been updated: Updater: Hunter Kelly (mailto:re...@ei...) Date: Mon, 8 Dec 2003 4:52 AM Changes: Attachment changed to IntVsUUIDOneToOneTest.java --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-531 Summary: One-To-One mappings with int/native ids don't work properly Type: Bug Status: Unassigned Priority: Critical Project: Hibernate2 Components: core Versions: 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Mon, 8 Dec 2003 4:49 AM Updated: Mon, 8 Dec 2003 4:52 AM Environment: RedHat Linux 9.0 MySQL 4.0.14-standard Latest Hibernate CVS tree Description: I have a one to one mapping in a class, Thing, that maps to IntThing and UUIDThing. IntThing and UUIDThing both define a many-to-one mapping back to Thing. Int thing uses "native" generator for id. UUID uses "uuid.hex" generator for id. I would have thought they'd behave the same, but they don't. I've built a truth table for each, where I changed the values of the "constrained" attribute on the one-to-one mapping and the "not-null" attribute on the many-to-one mapping. For UUID thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null | | true | failed | sucess ------------------------------------------------------- Not-Null | false | success | success ------------------------------------------------------- For Int thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null| | true | failed | failed ------------------------------------------------------- Not-Null| | false | success | failed ------------------------------------------------------- The above chart shows that regardless of what constrained is set to, you can't have a one-to-one mapping to an entity with an int id type that has a not-null constraint back to the parent. I'll attach the files now - to compile and run I just made a copy of the "eg" target in Hibernate's build.xml, uncommented the lines in hibernate.properties relevant to MySQL and changed the database name. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-08 10:51:42
|
The following issue has been updated: Updater: Hunter Kelly (mailto:re...@ei...) Date: Mon, 8 Dec 2003 4:50 AM Changes: Attachment changed to UUIDThing.java --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-531 Summary: One-To-One mappings with int/native ids don't work properly Type: Bug Status: Unassigned Priority: Critical Project: Hibernate2 Components: core Versions: 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Mon, 8 Dec 2003 4:49 AM Updated: Mon, 8 Dec 2003 4:50 AM Environment: RedHat Linux 9.0 MySQL 4.0.14-standard Latest Hibernate CVS tree Description: I have a one to one mapping in a class, Thing, that maps to IntThing and UUIDThing. IntThing and UUIDThing both define a many-to-one mapping back to Thing. Int thing uses "native" generator for id. UUID uses "uuid.hex" generator for id. I would have thought they'd behave the same, but they don't. I've built a truth table for each, where I changed the values of the "constrained" attribute on the one-to-one mapping and the "not-null" attribute on the many-to-one mapping. For UUID thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null | | true | failed | sucess ------------------------------------------------------- Not-Null | false | success | success ------------------------------------------------------- For Int thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null| | true | failed | failed ------------------------------------------------------- Not-Null| | false | success | failed ------------------------------------------------------- The above chart shows that regardless of what constrained is set to, you can't have a one-to-one mapping to an entity with an int id type that has a not-null constraint back to the parent. I'll attach the files now - to compile and run I just made a copy of the "eg" target in Hibernate's build.xml, uncommented the lines in hibernate.properties relevant to MySQL and changed the database name. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-08 10:51:42
|
The following issue has been updated: Updater: Hunter Kelly (mailto:re...@ei...) Date: Mon, 8 Dec 2003 4:50 AM Changes: Attachment changed to IntThing.java --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-531 Summary: One-To-One mappings with int/native ids don't work properly Type: Bug Status: Unassigned Priority: Critical Project: Hibernate2 Components: core Versions: 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Mon, 8 Dec 2003 4:49 AM Updated: Mon, 8 Dec 2003 4:50 AM Environment: RedHat Linux 9.0 MySQL 4.0.14-standard Latest Hibernate CVS tree Description: I have a one to one mapping in a class, Thing, that maps to IntThing and UUIDThing. IntThing and UUIDThing both define a many-to-one mapping back to Thing. Int thing uses "native" generator for id. UUID uses "uuid.hex" generator for id. I would have thought they'd behave the same, but they don't. I've built a truth table for each, where I changed the values of the "constrained" attribute on the one-to-one mapping and the "not-null" attribute on the many-to-one mapping. For UUID thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null | | true | failed | sucess ------------------------------------------------------- Not-Null | false | success | success ------------------------------------------------------- For Int thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null| | true | failed | failed ------------------------------------------------------- Not-Null| | false | success | failed ------------------------------------------------------- The above chart shows that regardless of what constrained is set to, you can't have a one-to-one mapping to an entity with an int id type that has a not-null constraint back to the parent. I'll attach the files now - to compile and run I just made a copy of the "eg" target in Hibernate's build.xml, uncommented the lines in hibernate.properties relevant to MySQL and changed the database name. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-08 10:51:41
|
The following issue has been updated: Updater: Hunter Kelly (mailto:re...@ei...) Date: Mon, 8 Dec 2003 4:50 AM Changes: Attachment changed to hibernate.cfg.xml --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-531 Summary: One-To-One mappings with int/native ids don't work properly Type: Bug Status: Unassigned Priority: Critical Project: Hibernate2 Components: core Versions: 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Mon, 8 Dec 2003 4:49 AM Updated: Mon, 8 Dec 2003 4:50 AM Environment: RedHat Linux 9.0 MySQL 4.0.14-standard Latest Hibernate CVS tree Description: I have a one to one mapping in a class, Thing, that maps to IntThing and UUIDThing. IntThing and UUIDThing both define a many-to-one mapping back to Thing. Int thing uses "native" generator for id. UUID uses "uuid.hex" generator for id. I would have thought they'd behave the same, but they don't. I've built a truth table for each, where I changed the values of the "constrained" attribute on the one-to-one mapping and the "not-null" attribute on the many-to-one mapping. For UUID thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null | | true | failed | sucess ------------------------------------------------------- Not-Null | false | success | success ------------------------------------------------------- For Int thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null| | true | failed | failed ------------------------------------------------------- Not-Null| | false | success | failed ------------------------------------------------------- The above chart shows that regardless of what constrained is set to, you can't have a one-to-one mapping to an entity with an int id type that has a not-null constraint back to the parent. I'll attach the files now - to compile and run I just made a copy of the "eg" target in Hibernate's build.xml, uncommented the lines in hibernate.properties relevant to MySQL and changed the database name. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-08 10:51:41
|
The following issue has been updated: Updater: Hunter Kelly (mailto:re...@ei...) Date: Mon, 8 Dec 2003 4:49 AM Changes: Attachment changed to Thing.hbm.xml --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-531 Summary: One-To-One mappings with int/native ids don't work properly Type: Bug Status: Unassigned Priority: Critical Project: Hibernate2 Components: core Versions: 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Mon, 8 Dec 2003 4:49 AM Updated: Mon, 8 Dec 2003 4:49 AM Environment: RedHat Linux 9.0 MySQL 4.0.14-standard Latest Hibernate CVS tree Description: I have a one to one mapping in a class, Thing, that maps to IntThing and UUIDThing. IntThing and UUIDThing both define a many-to-one mapping back to Thing. Int thing uses "native" generator for id. UUID uses "uuid.hex" generator for id. I would have thought they'd behave the same, but they don't. I've built a truth table for each, where I changed the values of the "constrained" attribute on the one-to-one mapping and the "not-null" attribute on the many-to-one mapping. For UUID thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null | | true | failed | sucess ------------------------------------------------------- Not-Null | false | success | success ------------------------------------------------------- For Int thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null| | true | failed | failed ------------------------------------------------------- Not-Null| | false | success | failed ------------------------------------------------------- The above chart shows that regardless of what constrained is set to, you can't have a one-to-one mapping to an entity with an int id type that has a not-null constraint back to the parent. I'll attach the files now - to compile and run I just made a copy of the "eg" target in Hibernate's build.xml, uncommented the lines in hibernate.properties relevant to MySQL and changed the database name. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-08 10:49:41
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-531 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-531 Summary: One-To-One mappings with int/native ids don't work properly Type: Bug Status: Unassigned Priority: Critical Project: Hibernate2 Components: core Versions: 2.1 final 2.1 rc1 Assignee: Reporter: Hunter Kelly Created: Mon, 8 Dec 2003 4:49 AM Updated: Mon, 8 Dec 2003 4:49 AM Environment: RedHat Linux 9.0 MySQL 4.0.14-standard Latest Hibernate CVS tree Description: I have a one to one mapping in a class, Thing, that maps to IntThing and UUIDThing. IntThing and UUIDThing both define a many-to-one mapping back to Thing. Int thing uses "native" generator for id. UUID uses "uuid.hex" generator for id. I would have thought they'd behave the same, but they don't. I've built a truth table for each, where I changed the values of the "constrained" attribute on the one-to-one mapping and the "not-null" attribute on the many-to-one mapping. For UUID thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null | | true | failed | sucess ------------------------------------------------------- Not-Null | false | success | success ------------------------------------------------------- For Int thing: Constrained = true | Constrained = false ------------------------------------------------------- Not-Null| | true | failed | failed ------------------------------------------------------- Not-Null| | false | success | failed ------------------------------------------------------- The above chart shows that regardless of what constrained is set to, you can't have a one-to-one mapping to an entity with an int id type that has a not-null constraint back to the parent. I'll attach the files now - to compile and run I just made a copy of the "eg" target in Hibernate's build.xml, uncommented the lines in hibernate.properties relevant to MySQL and changed the database name. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-08 02:25:41
|
The following comment has been added to this issue: Author: GoldenYears Created: Sun, 7 Dec 2003 8:25 PM Body: For this function. An mapping class is used for dynamaic filed and property map. An collection is used for one-to-many list. An indentify is used for one class to multi table mapping. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-152 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-152 Summary: Ability to map one class across two or more tables Type: New Feature Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.0.1 Assignee: Reporter: TURIN ACCOUNT Created: Tue, 8 Jul 2003 3:33 PM Updated: Sun, 7 Dec 2003 8:25 PM Description: Assumption is that the tables can all be joined with regular joins all the time, and that the key structure matches, although the name of the columns may differ across the tables. An insert of an object results in an insert to each of the mapped tables all using the same key value. The class can then map its properties to any column in any table. This should all be done without the workaround of using a delegate. Thank you. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-06 15:23:41
|
The following comment has been added to this issue: Author: Emmanuel Bernard Created: Sat, 6 Dec 2003 9:23 AM Body: By the way, this patch correct a minor bug in the 2.1 rc1. PropertyValueException were displaying the class name of the persister instead of the class name of the mapped class. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-31 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-31 Summary: Component not null Type: Improvement Status: Unassigned Priority: Minor Project: Hibernate2 Assignee: Reporter: Max Rydahl Andersen Created: Sat, 3 May 2003 10:18 AM Updated: Sat, 6 Dec 2003 9:23 AM Description: Component not null When all properties of component have null value Hibernate not instantiate that class. It will be nice to be able define will or will not component be instantiated in case all properties are null. For example if there are no values of columns "address_city" and "address_street" but address must not be null the instance of Address class must be assigned to property Enterprise.address. <class name="Enterprise"> <property name="name"/> <component name="address" class="Address" <b>not-null="true"</b>> <property name="city" column="address_city"/> <property name="street" column="address_street"/> </component> </class> With best regards. Dmitry M.ivlev http://sourceforge.net/tracker/index.php?func=detail&aid=706054&group_id=40712&atid=428711 --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-06 15:09:43
|
The following issue has been updated: Updater: Emmanuel Bernard (mailto:epb...@us...) Date: Sat, 6 Dec 2003 9:09 AM Comment: Here is a patch on top of the 2.1 branch on 12/6/2003. A not-null="true" component will raise a PropertyValueException if null. A not-null="false" component having not-null="true" sub component will also raise a PropertyValueException to be consistent whith the property behavior. component, dynamic-component, composite-element and nested-composite elements allow this functionality. Tests in the patch are hugly but do their job (dynamic-component not tested however). Changes: Attachment changed to notnullcomponent.hib2.1.patch --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-31&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-31 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-31 Summary: Component not null Type: Improvement Status: Unassigned Priority: Minor Project: Hibernate2 Assignee: Reporter: Max Rydahl Andersen Created: Sat, 3 May 2003 10:18 AM Updated: Sat, 6 Dec 2003 9:09 AM Description: Component not null When all properties of component have null value Hibernate not instantiate that class. It will be nice to be able define will or will not component be instantiated in case all properties are null. For example if there are no values of columns "address_city" and "address_street" but address must not be null the instance of Address class must be assigned to property Enterprise.address. <class name="Enterprise"> <property name="name"/> <component name="address" class="Address" <b>not-null="true"</b>> <property name="city" column="address_city"/> <property name="street" column="address_street"/> </component> </class> With best regards. Dmitry M.ivlev http://sourceforge.net/tracker/index.php?func=detail&aid=706054&group_id=40712&atid=428711 --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-06 14:12:41
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-529 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-529 Summary: mapping a class with several tables? Type: Improvement Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 final Assignee: Reporter: LiMo Created: Sat, 6 Dec 2003 8:12 AM Updated: Sat, 6 Dec 2003 8:12 AM Environment: rc1, mysql Description: can I make a class associate with several similar table ? It is a big problem for me. my project is a refactoring project to a old system. in the old system, we create a table by each year. such as: TBL_NEWS_2003, TBL_NEWS_2002 so when we need search in years, we use UNION to select from all table. BUT how can i do this in hibernate?? The situation is: When one develop a website such as a news website. It its very easy to decide making a generic News.class to fit for all kinds of news. eg. A news may have title, content, date ... so we develop a News.class. but we have different news, like entertaiment, sport, government, techinical ..... so, we must have dynamically mapping to News.class News.class should associate to several *.hbm.xml file, each file figure to a table. like News.sport.hbm.xml, News.entertaiment.hbm.xml (May be we can specify the different table name just in the filename) and the Configuaration can read all xml and one can query News.class in all different table or only one table. BUT actually I must make a News.hbm.xml for it. and i wrtie table name in the XML. OR when i query some news, can I specify a tablename or modualname parameter to the Session and get the same News.class from different table. can i make myself understand? Anyone who can give me the solution?? Thank you! --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-06 02:42:41
|
Message: The following issue has been closed. Resolver: Gavin King Date: Fri, 5 Dec 2003 8:42 PM OK, I added an assertion. Yes, you should never flush() the session after an exception occurs. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-528 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-528 Summary: SessionImpl.checkId does not handle null IDs Type: Bug Status: Closed Priority: Critical Resolution: FIXED Project: Hibernate2 Components: core Fix Fors: 2.1 final Versions: 2.1 rc1 Assignee: Reporter: Serge Knystautas Created: Fri, 5 Dec 2003 10:40 AM Updated: Fri, 5 Dec 2003 8:42 PM Environment: Hibernate 2.1 rc1 on Resin 2.1.8, Windows XP, Sun JDK 1.4.1, and SQL Server 2000. Description: I hit this problem with the following steps: 1. Create a class with a native ID generator (uses an Integer, but tried with in as well). 2. Instantiate that object, set some bean properties, call saveOrUpdate on this. Do not set a bean property for something that IS marked as not-null="true". This means it should fail to persist. 3. Call saveOrUpdate on the object, which should in theory generate a new ID and save it when session flushes. 4. When session flushes, you get a null pointer exception in net.sf.hibernate.impl.SessionImpl:2519 because id is null, because it couldn't save. The fix is to change that if comparison from ( !id.equals(oid)) to ((id == null && oid != null) || (id != null && !id.equals(oid)) ) With this in place, the checkId will now pass through cleanly (because id == oid == null), which I think is the correct behavior. The benefit is that instead of an unintelligible null pointer exception, it falls through and gives me the Flush not possible because a not-null value is null. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-06 02:15:41
|
The following comment has been added to this issue: Author: Serge Knystautas Created: Fri, 5 Dec 2003 8:15 PM Body: It happened because saveOrUpdate failed, so then I dropped into the catch/finally blocks which attempted to close/flush the session. So the first exception from the saveOrUpdate got dropped as the new exception from the session flush/close block. So if EntityEntry cannot have a null id, can we have an if in that block to test for if a null id then throw a Hibernate exception? I can see the argument that it's incorrect to flush a session when there's been a hibernate exception during that session, but a friendly error message could help a brute-force developer like me figure out what I should do instead. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-528 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-528 Summary: SessionImpl.checkId does not handle null IDs Type: Bug Status: Unassigned Priority: Critical Project: Hibernate2 Components: core Versions: 2.1 rc1 Assignee: Reporter: Serge Knystautas Created: Fri, 5 Dec 2003 10:40 AM Updated: Fri, 5 Dec 2003 8:15 PM Environment: Hibernate 2.1 rc1 on Resin 2.1.8, Windows XP, Sun JDK 1.4.1, and SQL Server 2000. Description: I hit this problem with the following steps: 1. Create a class with a native ID generator (uses an Integer, but tried with in as well). 2. Instantiate that object, set some bean properties, call saveOrUpdate on this. Do not set a bean property for something that IS marked as not-null="true". This means it should fail to persist. 3. Call saveOrUpdate on the object, which should in theory generate a new ID and save it when session flushes. 4. When session flushes, you get a null pointer exception in net.sf.hibernate.impl.SessionImpl:2519 because id is null, because it couldn't save. The fix is to change that if comparison from ( !id.equals(oid)) to ((id == null && oid != null) || (id != null && !id.equals(oid)) ) With this in place, the checkId will now pass through cleanly (because id == oid == null), which I think is the correct behavior. The benefit is that instead of an unintelligible null pointer exception, it falls through and gives me the Flush not possible because a not-null value is null. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-06 02:15:41
|
The following comment has been added to this issue: Author: Gavin King Created: Fri, 5 Dec 2003 8:14 PM Body: Although I suppose the query pagination does have the risk of "missing" rows. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-521 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-521 Summary: ScrollableResults from Criteria class Type: New Feature Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Assignee: Reporter: Don DeLuca Created: Thu, 4 Dec 2003 10:00 AM Updated: Fri, 5 Dec 2003 8:14 PM Environment: JDBC 2.0 compliant database that supports result set scrolling. Description: I've been using the Criteria API provided by Hibernate. Its really excellent. Would it be possible to provide scrolling functionality in the Criteria API similar to that in the Query API which has a scroll() method that returns a ScrollableResults object. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-12-06 02:13:41
|
The following comment has been added to this issue: Author: Gavin King Created: Fri, 5 Dec 2003 8:13 PM Body: I'm not really sure that this is such a great approach. Use query pagination setMaxResults()/setFirstResult() instead... --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-521 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-521 Summary: ScrollableResults from Criteria class Type: New Feature Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Assignee: Reporter: Don DeLuca Created: Thu, 4 Dec 2003 10:00 AM Updated: Fri, 5 Dec 2003 8:13 PM Environment: JDBC 2.0 compliant database that supports result set scrolling. Description: I've been using the Criteria API provided by Hibernate. Its really excellent. Would it be possible to provide scrolling functionality in the Criteria API similar to that in the Query API which has a scroll() method that returns a ScrollableResults object. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |