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: Max R. A. (JIRA) <no...@at...> - 2006-05-29 16:40:39
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-352?pag= e=3Dcomments#action_23193 ]=20 Max Rydahl Andersen commented on ANN-352: ----------------------------------------- for some readonly crazy mapping ? what about only allowing that if they actually specified that ? meaning if = no table is specified and more than one manytomany for the same entity we c= omplain with a msg saying that you need to explicitly specify them.....but = maybe that is too much of a grey area handling. > Incorrect database sceme created, when using multiple n:m relations betwe= en 2 entities > -------------------------------------------------------------------------= ------------- > > Key: ANN-352 > URL: http://opensource.atlassian.com/projects/hibernate/browse/A= NN-352 > Project: Hibernate Annotations > Type: Bug > Versions: 3.2.0.cr1 > Environment: Linux, Java 1.5, Postgresql 8.0 > Reporter: Erik Tews > > > Hi > I got 2 entities: > @Entity > public class UserBean implements Serializable { > .... > @ManyToMany > protected Set<LectureBean> getAdminLectures() { > .... > @ManyToMany > protected Set<LectureBean> getLectures() { > .... } > and on the other side > @Entity=20 > public class LectureBean implements Serializable { > @ManyToMany(mappedBy=3D"adminLectures", fetch=3DFetchType.LAZY, cascade= =3DCascadeType.PERSIST) > protected Set<UserBean> getAdminUsers() { > @ManyToMany(mappedBy=3D"lectures", fetch=3DFetchType.LAZY, cascade=3DCasc= adeType.PERSIST) > protected Set<UserBean> getUsers() { > .... > } > so there are 2 n:m relations between these entities. Hibernate generates = the following table: > adminusers_userid | adminlectures_lectureid | users_userid | lectures_lec= tureid > so it puts these 2 relations in one table but it adds foreign keys: > =C2=BBfk3fb6262a62053223=C2=AB FOREIGN KEY (adminlectures_lectureid) = REFERENCES lecturebean(lectureid) > =C2=BBfk3fb6262a569b3581=C2=AB FOREIGN KEY (users_userid) REFERENCES = userbean(userid) > =C2=BBfk3fb6262afb45c494=C2=AB FOREIGN KEY (lectures_lectureid) REFER= ENCES lecturebean(lectureid) > =C2=BBfk3fb6262a66a3ba50=C2=AB FOREIGN KEY (adminusers_userid) REFERE= NCES userbean(userid) > This makes it impossible to put 2 entities in relation, because 2 of the = 4 columns will always be null. > Adding differen column names for the join tables with @JoinTable works ar= ound the problem. --=20 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-29 14:40:22
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-352?pag= e=3Dcomments#action_23192 ]=20 Emmanuel Bernard commented on ANN-352: -------------------------------------- Well that's a tough one, we might want to complain if we use the default. B= ut what if the user did use the same assoc table explicitly for whatever re= ason. We shouldn't complain. > Incorrect database sceme created, when using multiple n:m relations betwe= en 2 entities > -------------------------------------------------------------------------= ------------- > > Key: ANN-352 > URL: http://opensource.atlassian.com/projects/hibernate/browse/A= NN-352 > Project: Hibernate Annotations > Type: Bug > Versions: 3.2.0.cr1 > Environment: Linux, Java 1.5, Postgresql 8.0 > Reporter: Erik Tews > > > Hi > I got 2 entities: > @Entity > public class UserBean implements Serializable { > .... > @ManyToMany > protected Set<LectureBean> getAdminLectures() { > .... > @ManyToMany > protected Set<LectureBean> getLectures() { > .... } > and on the other side > @Entity=20 > public class LectureBean implements Serializable { > @ManyToMany(mappedBy=3D"adminLectures", fetch=3DFetchType.LAZY, cascade= =3DCascadeType.PERSIST) > protected Set<UserBean> getAdminUsers() { > @ManyToMany(mappedBy=3D"lectures", fetch=3DFetchType.LAZY, cascade=3DCasc= adeType.PERSIST) > protected Set<UserBean> getUsers() { > .... > } > so there are 2 n:m relations between these entities. Hibernate generates = the following table: > adminusers_userid | adminlectures_lectureid | users_userid | lectures_lec= tureid > so it puts these 2 relations in one table but it adds foreign keys: > =C2=BBfk3fb6262a62053223=C2=AB FOREIGN KEY (adminlectures_lectureid) = REFERENCES lecturebean(lectureid) > =C2=BBfk3fb6262a569b3581=C2=AB FOREIGN KEY (users_userid) REFERENCES = userbean(userid) > =C2=BBfk3fb6262afb45c494=C2=AB FOREIGN KEY (lectures_lectureid) REFER= ENCES lecturebean(lectureid) > =C2=BBfk3fb6262a66a3ba50=C2=AB FOREIGN KEY (adminusers_userid) REFERE= NCES userbean(userid) > This makes it impossible to put 2 entities in relation, because 2 of the = 4 columns will always be null. > Adding differen column names for the join tables with @JoinTable works ar= ound the problem. --=20 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-05-29 14:32:36
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-352?pag= e=3Dcomments#action_23191 ]=20 Max Rydahl Andersen commented on ANN-352: ----------------------------------------- since it does not make any sense shouldn't we complain about it via a Mappi= ngException or something ? > Incorrect database sceme created, when using multiple n:m relations betwe= en 2 entities > -------------------------------------------------------------------------= ------------- > > Key: ANN-352 > URL: http://opensource.atlassian.com/projects/hibernate/browse/A= NN-352 > Project: Hibernate Annotations > Type: Bug > Versions: 3.2.0.cr1 > Environment: Linux, Java 1.5, Postgresql 8.0 > Reporter: Erik Tews > > > Hi > I got 2 entities: > @Entity > public class UserBean implements Serializable { > .... > @ManyToMany > protected Set<LectureBean> getAdminLectures() { > .... > @ManyToMany > protected Set<LectureBean> getLectures() { > .... } > and on the other side > @Entity=20 > public class LectureBean implements Serializable { > @ManyToMany(mappedBy=3D"adminLectures", fetch=3DFetchType.LAZY, cascade= =3DCascadeType.PERSIST) > protected Set<UserBean> getAdminUsers() { > @ManyToMany(mappedBy=3D"lectures", fetch=3DFetchType.LAZY, cascade=3DCasc= adeType.PERSIST) > protected Set<UserBean> getUsers() { > .... > } > so there are 2 n:m relations between these entities. Hibernate generates = the following table: > adminusers_userid | adminlectures_lectureid | users_userid | lectures_lec= tureid > so it puts these 2 relations in one table but it adds foreign keys: > =C2=BBfk3fb6262a62053223=C2=AB FOREIGN KEY (adminlectures_lectureid) = REFERENCES lecturebean(lectureid) > =C2=BBfk3fb6262a569b3581=C2=AB FOREIGN KEY (users_userid) REFERENCES = userbean(userid) > =C2=BBfk3fb6262afb45c494=C2=AB FOREIGN KEY (lectures_lectureid) REFER= ENCES lecturebean(lectureid) > =C2=BBfk3fb6262a66a3ba50=C2=AB FOREIGN KEY (adminusers_userid) REFERE= NCES userbean(userid) > This makes it impossible to put 2 entities in relation, because 2 of the = 4 columns will always be null. > Adding differen column names for the join tables with @JoinTable works ar= ound the problem. --=20 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-29 14:28:19
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-352?pa= ge=3Dall ] =20 Emmanuel Bernard resolved ANN-352: ---------------------------------- Resolution: Rejected This is the correct behavior. According to the spec, you must specify the a= ssociation tables when using more than one association between 2 entities > Incorrect database sceme created, when using multiple n:m relations betwe= en 2 entities > -------------------------------------------------------------------------= ------------- > > Key: ANN-352 > URL: http://opensource.atlassian.com/projects/hibernate/browse/A= NN-352 > Project: Hibernate Annotations > Type: Bug > Versions: 3.2.0.cr1 > Environment: Linux, Java 1.5, Postgresql 8.0 > Reporter: Erik Tews > > > Hi > I got 2 entities: > @Entity > public class UserBean implements Serializable { > .... > @ManyToMany > protected Set<LectureBean> getAdminLectures() { > .... > @ManyToMany > protected Set<LectureBean> getLectures() { > .... } > and on the other side > @Entity=20 > public class LectureBean implements Serializable { > @ManyToMany(mappedBy=3D"adminLectures", fetch=3DFetchType.LAZY, cascade= =3DCascadeType.PERSIST) > protected Set<UserBean> getAdminUsers() { > @ManyToMany(mappedBy=3D"lectures", fetch=3DFetchType.LAZY, cascade=3DCasc= adeType.PERSIST) > protected Set<UserBean> getUsers() { > .... > } > so there are 2 n:m relations between these entities. Hibernate generates = the following table: > adminusers_userid | adminlectures_lectureid | users_userid | lectures_lec= tureid > so it puts these 2 relations in one table but it adds foreign keys: > =C2=BBfk3fb6262a62053223=C2=AB FOREIGN KEY (adminlectures_lectureid) = REFERENCES lecturebean(lectureid) > =C2=BBfk3fb6262a569b3581=C2=AB FOREIGN KEY (users_userid) REFERENCES = userbean(userid) > =C2=BBfk3fb6262afb45c494=C2=AB FOREIGN KEY (lectures_lectureid) REFER= ENCES lecturebean(lectureid) > =C2=BBfk3fb6262a66a3ba50=C2=AB FOREIGN KEY (adminusers_userid) REFERE= NCES userbean(userid) > This makes it impossible to put 2 entities in relation, because 2 of the = 4 columns will always be null. > Adding differen column names for the join tables with @JoinTable works ar= ound the problem. --=20 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: David L. (JIRA) <no...@at...> - 2006-05-29 14:23:20
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-668?page=comments#action_23189 ] David Leal commented on HBX-668: -------------------------------- Dear Christian, My suggestion doesn't have to complicate the hbm2dll, because all such definitions the user have to insert via property file, it was just the suggestion, you know better than me what is the best design for this feature. I am aware of that it could be complicated to consider all cases, that is why my suggestion was to at least allow the user to configure if the primary key definition could be generated via ALTER TABLE, so on the generated file will be easier to modify. Now you have to delete the primary key definition on each create table and add an ALTER TABLE for each primary key, with my idea you at least you don't have to delete the primary key definition on the create table. We use hbm2ddl for getting the schema in oracle syntax because on production we have Oracle but during developer process for the moment we use mysql. Then we process the generated hbm2dll file in order to fix all this details like tablespace, etc. Please could you be more explicit about your comment no <database-object> (I guess it is a new features on the mapping files), in our particular case we make some minimal modification on the *.hbm file in order to add the oracle sequence during the building process. Probably to add also on this node specific database information would be more complicaded than just modify the database script. > Additional configuration for hbm2ddl script generation > ------------------------------------------------------ > > Key: HBX-668 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-668 > Project: Hibernate Tools > Type: Improvement > Versions: 3.1.beta5 > Reporter: David Leal > > > Just to suggest some additional configuraiton for hbm2ddl script generation, for example: > - Adding possibility to configure if the primary key can be defined using alter table instead on the create sentence. > - The same for unique index. > - Adding possibility for configuring information not provided by the *.hbm files, for example tablespace information. For example on the configuration file, could be defined the tablespace information for each table/index, primary key, etc. > The alter table aproach is better for production database in order to add tablespace information, such configuration can't be set on the create table sentence. > Thanks in advance, > David -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Thomas B. (JIRA) <no...@at...> - 2006-05-29 13:43:19
|
property update="false" ignored since 3.2.0.cr2 ----------------------------------------------- Key: HHH-1791 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1791 Project: Hibernate3 Type: Bug Components: core Versions: 3.2.0.cr2 Environment: Hibernate 3.2.0.cr2, MS SQL Server 2000, jTDS Reporter: Thomas Boerkel Mapping: <class name="p2plus.AuftragPos" table="AUFTRAGPOS"> <cache usage="read-write"/> <composite-id> <key-property name="auftrag" access="field"/> <key-property name="position" access="field"/> </composite-id> <version name="timestamp" type="byte[]" generated="always" access="field"/> <property name="id" access="field" generated="insert" update="false" insert="false"/> <property name="artikel" access="field"/> <property name="preis" access="field"/> <property name="datum" access="field"/> </class> I fetch an object, change a property and save. Hibernate 3.2.0.cr1 executes: update AUFTRAGPOS set artikel=?, preis=?, datum=? where auftrag=? and position=? and timestamp=? Hibernate 3.2.0.cr2 executes: update AUFTRAGPOS set id=?, artikel=?, preis=?, datum=? where auftrag=? and position=? and timestamp=? Code: Session session = HibernateUtil.getSessionFactory().getCurrentSession(); session.beginTransaction(); AuftragPos auftragPos = new AuftragPos(); auftragPos.setAuftrag("4711"); auftragPos.setPosition((short)3); auftragPos.setArtikel("V-10000"); auftragPos.setPreis(45); auftragPos.setDatum(new Date()); session.save(auftragPos); auftragPos = (AuftragPos)session.createQuery("from AuftragPos where position=3").uniqueResult(); auftragPos.setPreis(78); session.save(auftragPos); session.getTransaction().commit(); -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Christian B. (JIRA) <no...@at...> - 2006-05-29 13:41:23
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-668?page=comments#action_23188 ] Christian Bauer commented on HBX-668: ------------------------------------- And you probably also haven't seen <database-object>. > Additional configuration for hbm2ddl script generation > ------------------------------------------------------ > > Key: HBX-668 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-668 > Project: Hibernate Tools > Type: Improvement > Versions: 3.1.beta5 > Reporter: David Leal > > > Just to suggest some additional configuraiton for hbm2ddl script generation, for example: > - Adding possibility to configure if the primary key can be defined using alter table instead on the create sentence. > - The same for unique index. > - Adding possibility for configuring information not provided by the *.hbm files, for example tablespace information. For example on the configuration file, could be defined the tablespace information for each table/index, primary key, etc. > The alter table aproach is better for production database in order to add tablespace information, such configuration can't be set on the create table sentence. > Thanks in advance, > David -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Christian B. (JIRA) <no...@at...> - 2006-05-29 13:41:22
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-668?page=all ] Christian Bauer closed HBX-668: ------------------------------- Resolution: Won't Fix 1. There are several other issues open already, for improvements to hbm2ddl generation. This is a duplicate. 2. We will never ever add all these options to hbm2ddl. A) It's impossible to cover all possible optimizations and customization of a generated schema. If we add your wishes, the next guy will have others. B) Especially performance optimization is the job of a DBA, who takes the generated schema (file) and manipulates it by hand for deployment in staging and production. Performance optimization settings are _not_ required in a regular development process, for automatically generated schemas. Hibernate supports the most common and simple optimization, with indexes, but that's it. > Additional configuration for hbm2ddl script generation > ------------------------------------------------------ > > Key: HBX-668 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-668 > Project: Hibernate Tools > Type: Improvement > Versions: 3.1.beta5 > Reporter: David Leal > > > Just to suggest some additional configuraiton for hbm2ddl script generation, for example: > - Adding possibility to configure if the primary key can be defined using alter table instead on the create sentence. > - The same for unique index. > - Adding possibility for configuring information not provided by the *.hbm files, for example tablespace information. For example on the configuration file, could be defined the tablespace information for each table/index, primary key, etc. > The alter table aproach is better for production database in order to add tablespace information, such configuration can't be set on the create table sentence. > Thanks in advance, > David -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: David L. (JIRA) <no...@at...> - 2006-05-29 13:34:40
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-668?page=comments#action_23186 ] David Leal commented on HBX-668: -------------------------------- Max, I mean to define table space informaion on the create table for the primary key definition, for example I get the following create sentence using hbm2ddl (for oracle configuration): create table lra.lra_asset_management ( cif varchar2(9) not null, name varchar2(40), short_name varchar2(20), cnmv_code varchar2(6) unique, primary key (cif) ); but I would like to add a particular tablespace for the table and for the primery key, so: create table lra_asset_management ( cif varchar2(9) not null, name varchar2(40), short_name varchar2(20), cnmv_code varchar2(6) ) TABLESPACE BDACCVDO STORAGE ( INITIAL 960 NEXT 32 ); and for primary key: ALTER TABLE lra_asset_management ADD CONSTRAINT PK_LRA_ASSET_MANAGEMENT PRIMARY KEY (cif) USING INDEX TABLESPACE BDACCVIO PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE ( INITIAL 240 NEXT 8 MINEXTENTS 1 MAXEXTENTS 99 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 ); so I wanto to have the primary key and table definition on a different tablespace. My suggestion, is at least to allow on hbm2dll the user can control if the generated script file will use ALTER TABLE, or just primary key definition on the create table statement. The best solution, would be to allow additional information on the configuration property file in order to specify the tablespace info for tables and primary keys, beside additional information, such as create index definition, for example something like this: lra_asset_management.tablespace = TABLESPACE BDACCVDO STORAGE ( INITIAL 960 NEXT 32 ) and PK_LRA_ASSET_MANAGEMENT.tablespace = USING INDEX TABLESPACE BDACCVIO PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE ( INITIAL 240 NEXT 8 MINEXTENTS 1 MAXEXTENTS 99 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 so the name of the property will be the name of the table name or primary key name, plus tablespace suffix. Another property would be set too for adding create index information, for example: index = \ CREATE UNIQUE INDEX UQ_1_lra_asset_management \ ON @USER.@lra_asset_management (cnmv_code) \ PCTFREE 10 INITRANS 2 MAXTRANS 255 TABLESPACE @TABLESPACE@ STORAGE ( INITIAL 240 NEXT 8 PCTINCREASE 0 MINEXTENTS 2 MAXEXTENTS 2147483645 ); > Additional configuration for hbm2ddl script generation > ------------------------------------------------------ > > Key: HBX-668 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-668 > Project: Hibernate Tools > Type: Improvement > Versions: 3.1.beta5 > Reporter: David Leal > > > Just to suggest some additional configuraiton for hbm2ddl script generation, for example: > - Adding possibility to configure if the primary key can be defined using alter table instead on the create sentence. > - The same for unique index. > - Adding possibility for configuring information not provided by the *.hbm files, for example tablespace information. For example on the configuration file, could be defined the tablespace information for each table/index, primary key, etc. > The alter table aproach is better for production database in order to add tablespace information, such configuration can't be set on the create table sentence. > Thanks in advance, > David -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Erik T. (JIRA) <no...@at...> - 2006-05-29 12:31:23
|
Incorrect database sceme created, when using multiple n:m relations between= 2 entities ---------------------------------------------------------------------------= ----------- Key: ANN-352 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN= -352 Project: Hibernate Annotations Type: Bug Versions: 3.2.0.cr1 =20 Environment: Linux, Java 1.5, Postgresql 8.0 Reporter: Erik Tews Hi I got 2 entities: @Entity public class UserBean implements Serializable { .... @ManyToMany protected Set<LectureBean> getAdminLectures() { .... @ManyToMany protected Set<LectureBean> getLectures() { .... } and on the other side @Entity=20 public class LectureBean implements Serializable { @ManyToMany(mappedBy=3D"adminLectures", fetch=3DFetchType.LAZY, cascade=3DC= ascadeType.PERSIST) protected Set<UserBean> getAdminUsers() { @ManyToMany(mappedBy=3D"lectures", fetch=3DFetchType.LAZY, cascade=3DCascad= eType.PERSIST) protected Set<UserBean> getUsers() { .... } so there are 2 n:m relations between these entities. Hibernate generates th= e following table: adminusers_userid | adminlectures_lectureid | users_userid | lectures_lectu= reid so it puts these 2 relations in one table but it adds foreign keys: =C2=BBfk3fb6262a62053223=C2=AB FOREIGN KEY (adminlectures_lectureid) RE= FERENCES lecturebean(lectureid) =C2=BBfk3fb6262a569b3581=C2=AB FOREIGN KEY (users_userid) REFERENCES us= erbean(userid) =C2=BBfk3fb6262afb45c494=C2=AB FOREIGN KEY (lectures_lectureid) REFEREN= CES lecturebean(lectureid) =C2=BBfk3fb6262a66a3ba50=C2=AB FOREIGN KEY (adminusers_userid) REFERENC= ES userbean(userid) This makes it impossible to put 2 entities in relation, because 2 of the 4 = columns will always be null. Adding differen column names for the join tables with @JoinTable works arou= nd the problem. --=20 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-05-29 09:07:27
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-668?page=comments#action_23185 ] Max Rydahl Andersen commented on HBX-668: ----------------------------------------- What db does not support defining the primary key when you create the table ? > Additional configuration for hbm2ddl script generation > ------------------------------------------------------ > > Key: HBX-668 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-668 > Project: Hibernate Tools > Type: Improvement > Versions: 3.1.beta5 > Reporter: David Leal > > > Just to suggest some additional configuraiton for hbm2ddl script generation, for example: > - Adding possibility to configure if the primary key can be defined using alter table instead on the create sentence. > - The same for unique index. > - Adding possibility for configuring information not provided by the *.hbm files, for example tablespace information. For example on the configuration file, could be defined the tablespace information for each table/index, primary key, etc. > The alter table aproach is better for production database in order to add tablespace information, such configuration can't be set on the create table sentence. > Thanks in advance, > David -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Christian B. (JIRA) <no...@at...> - 2006-05-29 08:51:18
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1564?page=all ] Christian Bauer updated HHH-1564: --------------------------------- Attachment: onetomanydelete_test.tar.gz I can confirm that there is a problem with unnecessary updates for Parent, if cascading to Children collection is enabled. This is related to versioning of the Parent. Test case against latest SVN is attached. The UPDATE shouldn't happen, it also sets the version from 0 to 0: 10:49:50,751 DEBUG SessionImpl:222 - opened session at timestamp: 4705864051712000 10:49:50,752 DEBUG JDBCTransaction:54 - begin 10:49:50,753 DEBUG ConnectionManager:415 - opening JDBC connection 10:49:50,754 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0 10:49:50,758 DEBUG DriverManagerConnectionProvider:99 - using pooled JDBC connection, pool size: 0 10:49:50,766 DEBUG JDBCTransaction:59 - current autocommit status: false 10:49:50,772 DEBUG JDBCContext:203 - after transaction begin #### LOADIG PARENT 10:49:50,781 DEBUG DefaultLoadEventListener:154 - loading entity: [org.hibernate.test.onetomanydelete.Parent#1] 10:49:50,783 DEBUG DefaultLoadEventListener:309 - attempting to resolve: [org.hibernate.test.onetomanydelete.Parent#1] 10:49:50,785 DEBUG NonstrictReadWriteCache:41 - Cache lookup: org.hibernate.test.onetomanydelete.Parent#1 10:49:50,789 DEBUG NonstrictReadWriteCache:49 - Cache miss 10:49:50,790 DEBUG DefaultLoadEventListener:345 - object not resolved in any cache: [org.hibernate.test.onetomanydelete.Parent#1] 10:49:50,792 DEBUG AbstractEntityPersister:2814 - Fetching entity: [org.hibernate.test.onetomanydelete.Parent#1] 10:49:50,801 DEBUG Loader:1777 - loading entity: [org.hibernate.test.onetomanydelete.Parent#1] 10:49:50,808 DEBUG AbstractBatcher:358 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0) 10:49:50,810 DEBUG SQL:393 - select parent0_.parent_id as parent1_0_0_, parent0_.obj_version as obj2_0_0_, parent0_.name as name0_0_ from Parent parent0_ where parent0_.parent_id=? 10:49:50,812 DEBUG AbstractBatcher:476 - preparing statement 10:49:50,818 DEBUG AbstractBatcher:374 - about to open ResultSet (open ResultSets: 0, globally: 0) 10:49:50,820 DEBUG Loader:682 - processing result set 10:49:50,821 DEBUG Loader:687 - result set row: 0 10:49:50,823 DEBUG Loader:1164 - result row: EntityKey[org.hibernate.test.onetomanydelete.Parent#1] 10:49:50,825 DEBUG Loader:1347 - Initializing object from ResultSet: [org.hibernate.test.onetomanydelete.Parent#1] 10:49:50,830 DEBUG AbstractEntityPersister:1944 - Hydrating entity: [org.hibernate.test.onetomanydelete.Parent#1] 10:49:50,832 DEBUG TwoPhaseLoad:75 - Version: 0 10:49:50,835 DEBUG Loader:709 - done processing result set (1 rows) 10:49:50,837 DEBUG AbstractBatcher:381 - about to close ResultSet (open ResultSets: 1, globally: 1) 10:49:50,838 DEBUG AbstractBatcher:366 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1) 10:49:50,840 DEBUG AbstractBatcher:525 - closing statement 10:49:50,845 DEBUG Loader:839 - total objects hydrated: 1 10:49:50,846 DEBUG TwoPhaseLoad:107 - resolving associations for [org.hibernate.test.onetomanydelete.Parent#1] 10:49:50,853 DEBUG CollectionLoadContext:141 - creating collection wrapper:[org.hibernate.test.onetomanydelete.Parent.children#1] 10:49:50,856 DEBUG TwoPhaseLoad:135 - adding entity to second-level cache: [org.hibernate.test.onetomanydelete.Parent#1] 10:49:50,859 DEBUG NonstrictReadWriteCache:71 - Caching: org.hibernate.test.onetomanydelete.Parent#1 10:49:50,861 DEBUG TwoPhaseLoad:206 - done materializing entity [org.hibernate.test.onetomanydelete.Parent#1] 10:49:50,862 DEBUG StatefulPersistenceContext:748 - initializing non-lazy collections 10:49:50,865 DEBUG Loader:1808 - done entity load #### DELETING PARENT 10:49:50,868 DEBUG DefaultDeleteEventListener:90 - deleting a persistent instance 10:49:50,870 DEBUG DefaultDeleteEventListener:127 - deleting [org.hibernate.test.onetomanydelete.Parent#1] 10:49:50,874 DEBUG SessionImpl:1301 - setting cache mode to: GET 10:49:50,875 DEBUG Cascade:237 - processing cascade ACTION_DELETE for: org.hibernate.test.onetomanydelete.Parent 10:49:50,877 DEBUG Cascade:285 - cascade ACTION_DELETE for collection: org.hibernate.test.onetomanydelete.Parent.children 10:49:50,880 DEBUG DefaultInitializeCollectionEventListener:41 - initializing collection [org.hibernate.test.onetomanydelete.Parent.children#1] 10:49:50,882 DEBUG DefaultInitializeCollectionEventListener:47 - checking second-level cache 10:49:50,884 DEBUG NonstrictReadWriteCache:41 - Cache lookup: org.hibernate.test.onetomanydelete.Parent.children#1 10:49:50,885 DEBUG NonstrictReadWriteCache:49 - Cache miss 10:49:50,889 DEBUG DefaultInitializeCollectionEventListener:59 - collection not cached 10:49:50,891 DEBUG Loader:1911 - loading collection: [org.hibernate.test.onetomanydelete.Parent.children#1] 10:49:50,896 DEBUG AbstractBatcher:358 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0) 10:49:50,903 DEBUG SQL:393 - select children0_.parent_id as parent3_1_, children0_.child_id as child1_1_, children0_.child_id as child1_1_0_, children0_.name as name1_0_, children0_.parent_id as parent3_1_0_ from Child children0_ where children0_.parent_id=? 10:49:50,914 DEBUG AbstractBatcher:476 - preparing statement 10:49:50,924 DEBUG AbstractBatcher:374 - about to open ResultSet (open ResultSets: 0, globally: 0) 10:49:50,928 DEBUG Loader:1040 - result set contains (possibly empty) collection: [org.hibernate.test.onetomanydelete.Parent.children#1] 10:49:50,930 DEBUG CollectionLoadContext:84 - uninitialized collection: initializing 10:49:50,933 DEBUG Loader:682 - processing result set 10:49:50,934 DEBUG Loader:687 - result set row: 0 10:49:50,936 DEBUG Loader:1164 - result row: EntityKey[org.hibernate.test.onetomanydelete.Child#1] 10:49:50,939 DEBUG Loader:1347 - Initializing object from ResultSet: [org.hibernate.test.onetomanydelete.Child#1] 10:49:50,941 DEBUG AbstractEntityPersister:1944 - Hydrating entity: [org.hibernate.test.onetomanydelete.Child#1] 10:49:50,944 DEBUG Loader:972 - found row of collection: [org.hibernate.test.onetomanydelete.Parent.children#1] 10:49:50,946 DEBUG CollectionLoadContext:112 - reading row 10:49:50,948 DEBUG DefaultLoadEventListener:154 - loading entity: [org.hibernate.test.onetomanydelete.Child#1] 10:49:50,951 DEBUG DefaultLoadEventListener:309 - attempting to resolve: [org.hibernate.test.onetomanydelete.Child#1] 10:49:50,954 DEBUG DefaultLoadEventListener:318 - resolved object in session cache: [org.hibernate.test.onetomanydelete.Child#1] 10:49:50,956 DEBUG Loader:709 - done processing result set (1 rows) 10:49:50,958 DEBUG AbstractBatcher:381 - about to close ResultSet (open ResultSets: 1, globally: 1) 10:49:50,960 DEBUG AbstractBatcher:366 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1) 10:49:50,961 DEBUG AbstractBatcher:525 - closing statement 10:49:50,965 DEBUG Loader:839 - total objects hydrated: 1 10:49:50,967 DEBUG TwoPhaseLoad:107 - resolving associations for [org.hibernate.test.onetomanydelete.Child#1] 10:49:50,969 DEBUG DefaultLoadEventListener:154 - loading entity: [org.hibernate.test.onetomanydelete.Parent#1] 10:49:50,970 DEBUG DefaultLoadEventListener:227 - entity found in session cache 10:49:50,972 DEBUG TwoPhaseLoad:206 - done materializing entity [org.hibernate.test.onetomanydelete.Child#1] 10:49:50,981 DEBUG CollectionLoadContext:262 - 1 collections were found in result set for role: org.hibernate.test.onetomanydelete.Parent.children 10:49:50,991 DEBUG CollectionLoadContext:206 - collection fully initialized: [org.hibernate.test.onetomanydelete.Parent.children#1] 10:49:50,993 DEBUG CollectionLoadContext:272 - 1 collections initialized for role: org.hibernate.test.onetomanydelete.Parent.children 10:49:51,001 DEBUG StatefulPersistenceContext:748 - initializing non-lazy collections 10:49:51,003 DEBUG Loader:1935 - done loading collection 10:49:51,005 DEBUG DefaultInitializeCollectionEventListener:61 - collection initialized 10:49:51,015 DEBUG CascadingAction:45 - cascading to delete: org.hibernate.test.onetomanydelete.Child 10:49:51,016 DEBUG DefaultDeleteEventListener:90 - deleting a persistent instance 10:49:51,018 DEBUG DefaultDeleteEventListener:127 - deleting [org.hibernate.test.onetomanydelete.Child#1] 10:49:51,020 DEBUG SessionImpl:1301 - setting cache mode to: GET 10:49:51,021 DEBUG SessionImpl:1301 - setting cache mode to: GET 10:49:51,025 DEBUG SessionImpl:1301 - setting cache mode to: GET 10:49:51,028 DEBUG SessionImpl:1301 - setting cache mode to: GET 10:49:51,029 DEBUG Cascade:300 - done cascade ACTION_DELETE for collection: org.hibernate.test.onetomanydelete.Parent.children 10:49:51,031 DEBUG Cascade:259 - done processing cascade ACTION_DELETE for: org.hibernate.test.onetomanydelete.Parent 10:49:51,032 DEBUG SessionImpl:1301 - setting cache mode to: NORMAL 10:49:51,034 DEBUG SessionImpl:1301 - setting cache mode to: GET 10:49:51,035 DEBUG Cascade:237 - processing cascade ACTION_DELETE for: org.hibernate.test.onetomanydelete.Parent 10:49:51,037 DEBUG Cascade:259 - done processing cascade ACTION_DELETE for: org.hibernate.test.onetomanydelete.Parent 10:49:51,038 DEBUG SessionImpl:1301 - setting cache mode to: NORMAL #### FLUSHING 10:49:51,040 DEBUG AbstractFlushingEventListener:58 - flushing session 10:49:51,042 DEBUG AbstractFlushingEventListener:111 - processing flush-time cascades 10:49:51,043 DEBUG AbstractFlushingEventListener:153 - dirty checking collections 10:49:51,045 DEBUG AbstractFlushingEventListener:170 - Flushing entities and processing referenced collections 10:49:51,047 DEBUG AbstractEntityPersister:2960 - org.hibernate.test.onetomanydelete.Parent.children is dirty 10:49:51,049 DEBUG DefaultFlushEntityEventListener:223 - Updating deleted entity: [org.hibernate.test.onetomanydelete.Parent#1] 10:49:51,053 DEBUG AbstractFlushingEventListener:209 - Processing unreferenced collections 10:49:51,055 DEBUG Collections:52 - Collection dereferenced: [org.hibernate.test.onetomanydelete.Parent.children#1] 10:49:51,057 DEBUG AbstractFlushingEventListener:223 - Scheduling collection removes/(re)creates/updates 10:49:51,060 DEBUG AbstractFlushingEventListener:85 - Flushed: 0 insertions, 1 updates, 2 deletions to 2 objects 10:49:51,063 DEBUG AbstractFlushingEventListener:91 - Flushed: 0 (re)creations, 0 updates, 1 removals to 1 collections 10:49:51,065 DEBUG Printer:83 - listing entities: 10:49:51,067 DEBUG Printer:90 - org.hibernate.test.onetomanydelete.Child{name=Child One, parent=org.hibernate.test.onetomanydelete.Parent#1, id=1} 10:49:51,069 DEBUG Printer:90 - org.hibernate.test.onetomanydelete.Parent{name=Parent, children=[org.hibernate.test.onetomanydelete.Child#1], id=1, version=0} 10:49:51,071 DEBUG AbstractFlushingEventListener:289 - executing flush 10:49:51,072 DEBUG ConnectionManager:463 - registering flush begin 10:49:51,074 DEBUG AbstractEntityPersister:2211 - Updating entity: [org.hibernate.test.onetomanydelete.Parent#1] 10:49:51,076 DEBUG AbstractEntityPersister:2213 - Existing version: 0 -> New version: 0 10:49:51,077 DEBUG AbstractBatcher:358 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0) 10:49:51,081 DEBUG SQL:393 - update Parent set obj_version=?, name=? where parent_id=? and obj_version=? 10:49:51,083 DEBUG AbstractBatcher:476 - preparing statement 10:49:51,085 DEBUG AbstractEntityPersister:1905 - Dehydrating entity: [org.hibernate.test.onetomanydelete.Parent#1] 10:49:51,087 DEBUG AbstractBatcher:28 - Adding to batch 10:49:51,088 DEBUG NonstrictReadWriteCache:116 - Invalidating: org.hibernate.test.onetomanydelete.Parent#1 10:49:51,090 DEBUG AbstractBatcher:55 - Executing batch size: 1 10:49:51,092 DEBUG AbstractBatcher:366 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1) 10:49:51,094 DEBUG AbstractBatcher:525 - closing statement 10:49:51,100 DEBUG NonstrictReadWriteCache:116 - Invalidating: org.hibernate.test.onetomanydelete.Parent.children#1 10:49:51,106 DEBUG AbstractEntityPersister:2319 - Deleting entity: [org.hibernate.test.onetomanydelete.Child#1] 10:49:51,109 DEBUG AbstractBatcher:358 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0) 10:49:51,111 DEBUG SQL:393 - delete from Child where child_id=? 10:49:51,113 DEBUG AbstractBatcher:476 - preparing statement 10:49:51,115 DEBUG AbstractBatcher:28 - Adding to batch 10:49:51,116 DEBUG NonstrictReadWriteCache:116 - Invalidating: org.hibernate.test.onetomanydelete.Child#1 10:49:51,118 DEBUG AbstractEntityPersister:2319 - Deleting entity: [org.hibernate.test.onetomanydelete.Parent#1] 10:49:51,121 DEBUG AbstractEntityPersister:2321 - Version: 0 10:49:51,122 DEBUG AbstractBatcher:55 - Executing batch size: 1 10:49:51,124 DEBUG AbstractBatcher:366 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1) 10:49:51,126 DEBUG AbstractBatcher:525 - closing statement 10:49:51,127 DEBUG AbstractBatcher:358 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0) 10:49:51,130 DEBUG SQL:393 - delete from Parent where parent_id=? and obj_version=? 10:49:51,132 DEBUG AbstractBatcher:476 - preparing statement 10:49:51,134 DEBUG AbstractBatcher:28 - Adding to batch 10:49:51,137 DEBUG NonstrictReadWriteCache:116 - Invalidating: org.hibernate.test.onetomanydelete.Parent#1 10:49:51,138 DEBUG AbstractBatcher:55 - Executing batch size: 1 10:49:51,139 DEBUG AbstractBatcher:366 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1) 10:49:51,141 DEBUG AbstractBatcher:525 - closing statement 10:49:51,142 DEBUG ConnectionManager:472 - registering flush end 10:49:51,143 DEBUG AbstractFlushingEventListener:320 - post flush 10:49:51,145 DEBUG JDBCTransaction:103 - commit 10:49:51,148 DEBUG SessionImpl:339 - automatically flushing session 10:49:51,149 DEBUG AbstractFlushingEventListener:58 - flushing session 10:49:51,152 DEBUG AbstractFlushingEventListener:111 - processing flush-time cascades 10:49:51,153 DEBUG AbstractFlushingEventListener:153 - dirty checking collections 10:49:51,155 DEBUG AbstractFlushingEventListener:170 - Flushing entities and processing referenced collections 10:49:51,156 DEBUG AbstractFlushingEventListener:209 - Processing unreferenced collections 10:49:51,158 DEBUG AbstractFlushingEventListener:223 - Scheduling collection removes/(re)creates/updates 10:49:51,159 DEBUG AbstractFlushingEventListener:85 - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects 10:49:51,161 DEBUG AbstractFlushingEventListener:91 - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections 10:49:51,162 DEBUG AbstractFlushingEventListener:289 - executing flush 10:49:51,165 DEBUG ConnectionManager:463 - registering flush begin 10:49:51,166 DEBUG ConnectionManager:472 - registering flush end 10:49:51,168 DEBUG AbstractFlushingEventListener:320 - post flush 10:49:51,170 DEBUG JDBCContext:194 - before transaction completion 10:49:51,171 DEBUG SessionImpl:395 - before transaction completion 10:49:51,172 DEBUG JDBCTransaction:116 - committed JDBC Connection 10:49:51,173 DEBUG JDBCContext:208 - after transaction completion 10:49:51,174 DEBUG ConnectionManager:398 - aggressively releasing JDBC connection 10:49:51,176 DEBUG ConnectionManager:435 - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)] 10:49:51,177 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1 10:49:51,179 DEBUG SessionImpl:424 - after transaction completion 10:49:51,180 DEBUG NonstrictReadWriteCache:142 - Invalidating (again): org.hibernate.test.onetomanydelete.Parent#1 10:49:51,182 DEBUG NonstrictReadWriteCache:142 - Invalidating (again): org.hibernate.test.onetomanydelete.Parent.children#1 10:49:51,184 DEBUG NonstrictReadWriteCache:142 - Invalidating (again): org.hibernate.test.onetomanydelete.Child#1 10:49:51,186 DEBUG NonstrictReadWriteCache:142 - Invalidating (again): org.hibernate.test.onetomanydelete.Parent#1 10:49:51,187 DEBUG SessionImpl:275 - closing session 10:49:51,188 DEBUG ConnectionManager:369 - connection already null in cleanup : no action > Possible bug with deleting versioned object (patch included) > ------------------------------------------------------------ > > Key: HHH-1564 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1564 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.1.2 > Environment: 3.1rc2 > Reporter: N Clayton > Attachments: onetomanydelete_test.tar.gz > > > We're seeing an odd problem when trying to delete a row. The code that does this simply creates a new object, commits it, starts a new session, finds the object, deletes it. It dies with a constraint violation on an audit table, because hibernate is issuing an unnecessary update operation (and not incrementing the version either). Further debugging shows that Hibernate thinks that three properties on the object are 'modified'. These three are collections. One is the points collection, one owners and the other is systems. Hibernate seems to think that they are 'different' because null != an empty collection. So, it thinks it needs to update the object. However; later on - it doesn't increment the version number - because it knows the object is to be deleted. Thus - a problem. > A complete description is here: > http://forum.hibernate.org/viewtopic.php?t=950225&highlight=collectiontype+isdirty > This appears to be fixed if we change CollectionType.isDirty() to be: > public boolean isDirty(Object old, Object current, boolean[] checkable, SessionImplementor session) > throws HibernateException { > if(checkable.length == 0) { > // Assume not checkable > return false; > } > return isDirty(old, current, session); > } -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: David L. (JIRA) <no...@at...> - 2006-05-29 08:49:26
|
Additional configuration for hbm2ddl script generation ------------------------------------------------------ Key: HBX-668 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-668 Project: Hibernate Tools Type: Improvement Versions: 3.1.beta5 Reporter: David Leal Just to suggest some additional configuraiton for hbm2ddl script generation, for example: - Adding possibility to configure if the primary key can be defined using alter table instead on the create sentence. - The same for unique index. - Adding possibility for configuring information not provided by the *.hbm files, for example tablespace information. For example on the configuration file, could be defined the tablespace information for each table/index, primary key, etc. The alter table aproach is better for production database in order to add tablespace information, such configuration can't be set on the create table sentence. Thanks in advance, David -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-29 04:05:18
|
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-187?page=all ] Emmanuel Bernard resolved EJB-187: ---------------------------------- Resolution: Fixed > RuntimeException raised in CallBack methods should be left as is > ---------------------------------------------------------------- > > Key: EJB-187 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-187 > Project: Hibernate Entity Manager > Type: Bug > Components: EntityManager > Versions: 3.2.0.cr1 > Reporter: Emmanuel Bernard > Assignee: Emmanuel Bernard > Priority: Minor > Fix For: 3.2.0 > > > Not clearly in the spec, but make sense anyway -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-29 04:03:28
|
RuntimeException raised in CallBack methods should be left as is ---------------------------------------------------------------- Key: EJB-187 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-187 Project: Hibernate Entity Manager Type: Bug Components: EntityManager Versions: 3.2.0.cr1 Reporter: Emmanuel Bernard Assigned to: Emmanuel Bernard Priority: Minor Fix For: 3.2.0 Not clearly in the spec, but make sense anyway -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Gavin K. (JIRA) <no...@at...> - 2006-05-28 19:27:18
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1610?page=comments#action_23183 ] Gavin King commented on HHH-1610: --------------------------------- If people don't submit test cases, bug reports are useless. > many-to-one objects and hibernate-mapping default-lazy="false" > -------------------------------------------------------------- > > Key: HHH-1610 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1610 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.1.3 > Environment: 3.1.3, MSSQL 2000, Tomcat 5.5.12, JRE 1.5.0_06-b05 > Reporter: Oleg Byelkin > > > After migration from hibernate 3.1.2 to 3.1.3 I figured out that all my <many-to-one ...> objects become lazy loading in runtime (I use build time instrumentation). > In other words, if you explicitly set default-lazy to "false" and lazy identificator for many-to-one was omitted, then you many-to-one class will be lazy-loaded in runtime. > My typical mapping file looks like below. If I try get access to branch.getCompany(), I'll get an exception org.hibernate.exception.GenericJDBCException: could not initialize lazy properties: [package.Company]. > ... > <hibernate-mapping default-lazy="false"> > <class name="package.Branch" table="branch"> > ... > <many-to-one name="company" class="package.Company" > not-null="true" access="field" outer-join="false"> > <column name="company" sql-type="char(32)"/> > </many-to-one> > ... > </class> > </hibernate-mapping> > --- -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Gavin K. (JIRA) <no...@at...> - 2006-05-28 19:25:19
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1740?page=comments#action_23182 ] Gavin King commented on HHH-1740: --------------------------------- Yes, of course you must include a test case. > Build-time instrumentation breaks lazy="proxy" > ---------------------------------------------- > > Key: HHH-1740 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1740 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.1.3, 3.2.0 cr1, 3.2.0.cr2 > Reporter: Frank Grimes > Priority: Critical > > > I have a mapping that contains a many-to-one lazy="proxy". > This alone works fine: I see $$EnhancerByCGLIB$$ as the type when I do a load > Once I add a lazy property to the mapping and do build-time cglib enhancement, it breaks. > Not only is the lazy property listed in $CGLIB_READ_WRITE_CALLBACK, but also my lazy="proxy" association. (i.e. no more proxy object) > This works fine in hibernate-3.1.2. > This was originally brought up here: http://forums.hibernate.org/viewtopic.php?t=958881 > Please let me know if more info or a test case is needed. -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-05-28 17:20:18
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-666?page=all ] Max Rydahl Andersen closed HBX-666: ----------------------------------- Fix Version: 3.2beta6 Resolution: Fixed implemented support for appending generics info IFF the value is a collection and the "property-type" does not contain a ">". > generics not used when overriding Bag implementation from Collection type to List > --------------------------------------------------------------------------------- > > Key: HBX-666 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-666 > Project: Hibernate Tools > Type: Improvement > Components: hbm2java > Versions: 3.1alpha5 > Environment: hibernate 3.0.5, htools 3.1.5 > Reporter: Chris Koch > Fix For: 3.2beta6 > > > when overriding the Bag implementation from Collection type to java.util.List using the <meta attribute="property-type">java.util.List</meta>, generics are not generated for the List. It'd be nice to be able to keep generics. -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-05-28 16:46:21
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-667?page=comments#action_23180 ] Max Rydahl Andersen commented on HBX-667: ----------------------------------------- i can reproduce this via ant, but are you 100% you are not using reverse engineering in the eclipse plugin instead of the hbm.xml as you show here ? (reveng is namely automatically injecting the proper meta attributes into the composite id, where as the hbm.xml dumping does not include the meta attributes) btw. the fix is a bit hard to implement since the pojo generator must be told if a component is actually a composite-id; at the moment it does not know. ...and i'm not sure i want to do that instead of adding <meta> support to the hbmxml exporter. > hbm2java does not generate equals/hashCode for composite-id > ----------------------------------------------------------- > > Key: HBX-667 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-667 > Project: Hibernate Tools > Type: Bug > Components: hbm2java, ant > Versions: 3.1.beta5 > Environment: Hibernate 3.1.3, Sybase database, Windows platform > Reporter: Andrey Myatlyuk > Attachments: library_dir.gif > > > I'm using Hibernate Tools 3.1.0.beta5 > If I use the tools as plug-in for eclipse, it works perfect. All hashCode and equals methods are generated automatically. But if I use Ant task to do the same, no hashCode or equals method are generated. If I use meta attibutes in mapping, then method is implemented, but I have too many composite id to generate, so I'd like hbm2java generate them for me. As it suppose to do. > hibernate.cfg.xml > and mappings are the same > the list of jar files is attached > Ant build script: > <path id="library.hibernatetools.classpath"> > <fileset dir="C:/dev/hibernate/hibernatetools-3.1.0.beta5/lib"> > <include name="*.jar"/> > </fileset> > </path> > <taskdef name="hibernatetool" > classname="org.hibernate.tool.ant.HibernateToolTask" > classpathref="library.hibernatetools.classpath"/> > <target name="hbm2java"> > <hibernatetool destdir="${module.jstl.basedir}/src"> > <classpath> > <path location="${module.jstl.basedir}/src"/> > </classpath> > <configuration configurationfile="${module.jstl.basedir}/src/hibernate.cfg.xml"/> > <hbm2java/> > </hibernatetool> > </target> > Mapping: > <?xml version="1.0"?> > <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" > "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> > <!-- Generated May 22, 2006 3:18:01 PM by Hibernate Tools 3.1.0.beta5 --> > <hibernate-mapping> > <class name="model.ResponseNote" table="ECB_NOTES_RESP" schema="dbo" catalog="recon_dev"> > <composite-id name="id" class="model.ResponseNoteId"> > <key-property name="ecbResponseId" type="long"> > <column name="ECB_RESPONSE_ID" precision="15" scale="0" /> > </key-property> > <key-property name="ecbEligibilityId" type="int"> > <column name="ECB_ELIGIBILITY_ID" /> > </key-property> > <key-property name="ecbNotesId" type="int"> > <column name="ECB_NOTES_ID" /> > </key-property> > </composite-id> > <property name="notes" type="string"> > <column name="NOTES" length="264" /> > </property> > </class> > </hibernate-mapping> > Generated java with Ant task: > package model; > // Generated May 24, 2006 2:51:40 PM by Hibernate Tools 3.1.0.beta5 > /** > * ResponseNoteId generated by hbm2java > */ > public class ResponseNoteId implements java.io.Serializable { > // Fields > private long ecbResponseId; > private int ecbEligibilityId; > private int ecbNotesId; > // Constructors > /** default constructor */ > public ResponseNoteId() { > } > /** full constructor */ > public ResponseNoteId(long ecbResponseId, int ecbEligibilityId, int ecbNotesId) { > this.ecbResponseId = ecbResponseId; > this.ecbEligibilityId = ecbEligibilityId; > this.ecbNotesId = ecbNotesId; > } > > > // Property accessors > public long getEcbResponseId() { > return this.ecbResponseId; > } > > public void setEcbResponseId(long ecbResponseId) { > this.ecbResponseId = ecbResponseId; > } > public int getEcbEligibilityId() { > return this.ecbEligibilityId; > } > > public void setEcbEligibilityId(int ecbEligibilityId) { > this.ecbEligibilityId = ecbEligibilityId; > } > public int getEcbNotesId() { > return this.ecbNotesId; > } > > public void setEcbNotesId(int ecbNotesId) { > this.ecbNotesId = ecbNotesId; > } > } > Generated java within Eclipse: > package model; > // Generated May 24, 2006 11:43:19 AM by Hibernate Tools 3.1.0.beta5 > /** > * EcbNotesRespId generated by hbm2java > */ > public class EcbNotesRespId implements java.io.Serializable { > // Fields > private long ecbResponseId; > private int ecbEligibilityId; > private int ecbNotesId; > // Constructors > /** default constructor */ > public EcbNotesRespId() { > } > /** full constructor */ > public EcbNotesRespId(long ecbResponseId, int ecbEligibilityId, > int ecbNotesId) { > this.ecbResponseId = ecbResponseId; > this.ecbEligibilityId = ecbEligibilityId; > this.ecbNotesId = ecbNotesId; > } > // Property accessors > public long getEcbResponseId() { > return this.ecbResponseId; > } > public void setEcbResponseId(long ecbResponseId) { > this.ecbResponseId = ecbResponseId; > } > public int getEcbEligibilityId() { > return this.ecbEligibilityId; > } > public void setEcbEligibilityId(int ecbEligibilityId) { > this.ecbEligibilityId = ecbEligibilityId; > } > public int getEcbNotesId() { > return this.ecbNotesId; > } > public void setEcbNotesId(int ecbNotesId) { > this.ecbNotesId = ecbNotesId; > } > public boolean equals(Object other) { > if ((this == other)) > return true; > if ((other == null)) > return false; > if (!(other instanceof EcbNotesRespId)) > return false; > EcbNotesRespId castOther = (EcbNotesRespId) other; > return (this.getEcbResponseId() == castOther.getEcbResponseId()) > && (this.getEcbEligibilityId() == castOther > .getEcbEligibilityId()) > && (this.getEcbNotesId() == castOther.getEcbNotesId()); > } > public int hashCode() { > int result = 17; > result = 37 * result + (int) this.getEcbResponseId(); > result = 37 * result + this.getEcbEligibilityId(); > result = 37 * result + this.getEcbNotesId(); > return result; > } > } > With all this code with Ant task I get ResponseNoteId java file without equals or hashCode methods. While within Eclipse, using the same code I get equals and hashCode implemented. -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-28 15:26:17
|
Set the default cache provider to NoCache to prevent PU misuse to raise exceptions ---------------------------------------------------------------------------------- Key: EJB-186 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-186 Project: Hibernate Entity Manager Type: Improvement Components: EntityManager Reporter: Emmanuel Bernard Assigned to: Emmanuel Bernard Fix For: 3.2.0 -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-28 15:24:20
|
Some EJB3 exceptions does not support nested exceptions ------------------------------------------------------- Key: EJB-185 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-185 Project: Hibernate Entity Manager Type: Bug Components: EntityManager Versions: 3.2.0.cr1 Reporter: Emmanuel Bernard Assigned to: Emmanuel Bernard Fix For: 3.2.0 -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-28 15:22:21
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-350?page=all ] Emmanuel Bernard resolved ANN-350: ---------------------------------- Resolution: Fixed > Support ejb3 dd when no schema locator is defined > ------------------------------------------------- > > Key: ANN-350 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-350 > Project: Hibernate Annotations > Type: Improvement > Components: binder > Reporter: Emmanuel Bernard > Assignee: Emmanuel Bernard > Priority: Minor > Fix For: 3.2.0 > > -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-28 15:22:21
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-351?page=all ] Emmanuel Bernard resolved ANN-351: ---------------------------------- Resolution: Fixed > Validator Brazilian translation > ------------------------------- > > Key: ANN-351 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-351 > Project: Hibernate Annotations > Type: Improvement > Components: binder > Reporter: Emmanuel Bernard > Assignee: Emmanuel Bernard > Priority: Minor > Fix For: 3.2.0 > > -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-28 15:20:17
|
Validator Brazilian translation ------------------------------- Key: ANN-351 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-351 Project: Hibernate Annotations Type: Improvement Components: binder Reporter: Emmanuel Bernard Assigned to: Emmanuel Bernard Priority: Minor Fix For: 3.2.0 -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-28 15:18:25
|
Support ejb3 dd when no schema locator is defined ------------------------------------------------- Key: ANN-350 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-350 Project: Hibernate Annotations Type: Improvement Components: binder Reporter: Emmanuel Bernard Assigned to: Emmanuel Bernard Priority: Minor Fix For: 3.2.0 -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira |