You can subscribe to this list here.
2002 |
Jan
(2) |
Feb
(157) |
Mar
(111) |
Apr
(61) |
May
(68) |
Jun
(45) |
Jul
(101) |
Aug
(132) |
Sep
(148) |
Oct
(227) |
Nov
(141) |
Dec
(285) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(518) |
Feb
(462) |
Mar
(390) |
Apr
(488) |
May
(321) |
Jun
(336) |
Jul
(268) |
Aug
(374) |
Sep
(211) |
Oct
(246) |
Nov
(239) |
Dec
(173) |
2004 |
Jan
(110) |
Feb
(131) |
Mar
(85) |
Apr
(120) |
May
(82) |
Jun
(101) |
Jul
(54) |
Aug
(65) |
Sep
(94) |
Oct
(51) |
Nov
(56) |
Dec
(168) |
2005 |
Jan
(146) |
Feb
(98) |
Mar
(75) |
Apr
(118) |
May
(85) |
Jun
(75) |
Jul
(44) |
Aug
(94) |
Sep
(70) |
Oct
(84) |
Nov
(115) |
Dec
(52) |
2006 |
Jan
(113) |
Feb
(83) |
Mar
(217) |
Apr
(158) |
May
(219) |
Jun
(218) |
Jul
(189) |
Aug
(39) |
Sep
(3) |
Oct
(7) |
Nov
(4) |
Dec
(2) |
2007 |
Jan
|
Feb
(2) |
Mar
(7) |
Apr
(3) |
May
(3) |
Jun
(8) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(4) |
Nov
(7) |
Dec
|
2008 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2009 |
Jan
(6) |
Feb
|
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(10) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(3) |
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Chris W. <cwi...@op...> - 2002-09-28 04:39:39
|
On Sat, 2002-09-28 at 00:17, Gavin King wrote: > Yes, well you see that was my understanding also. My reading of that > statement is that the identity column *on its own* is a unique key of the > table (whether theres a UNIQUE constraint or not). > > So a primary key constraint that includes an identity column is actually an > *error* in the relational model. The other columns are redundant. Yes, they're redundant in the relational sense. But I don't think they are in the performance sense which is one reason I believe they're used. (I'm a little more curious about this now and will probably bug someone about it on Monday.) But I'm not a database guy, just a developer :-) Chris |
From: Gavin K. <ga...@ap...> - 2002-09-28 04:17:48
|
> IDENTITY fields in MS SQL (and Sybase, for that matter) are very simple: > there can be only one IDENTITY field per table, and every INSERT is > guaranteed to generate a unique value for that field. Yes, well you see that was my understanding also. My reading of that statement is that the identity column *on its own* is a unique key of the table (whether theres a UNIQUE constraint or not). So a primary key constraint that includes an identity column is actually an *error* in the relational model. The other columns are redundant. |
From: Chris W. <cwi...@op...> - 2002-09-28 01:10:04
|
On Fri, 2002-09-27 at 19:15, Gavin King wrote: > Thats what happens when you write emails at 3 am. I meant to express my > interest in the fact that MS SQL can generate values that are unique, not > for the whole table, but only for other rows with the same values in the > other primary key fields. I never knew something like that existed... IDENTITY fields in MS SQL (and Sybase, for that matter) are very simple: there can be only one IDENTITY field per table, and every INSERT is guaranteed to generate a unique value for that field. Beyond that, you can use them however you like -- they *can* (and frequently are) a single primary key field, but that's not a requirement. Whether it's a good design to have an IDENTITY field as part of a composite key is another discussion... :-) Chris |
From: Gavin K. <ga...@ap...> - 2002-09-28 00:55:48
|
Ace! All good, as far as I can tell :) Thanks Jon! ----- Original Message ----- From: "Jon Lipsky" <jon...@xe...> To: <hib...@li...> Sent: Saturday, September 28, 2002 3:53 AM Subject: Re: [Hibernate] Implentation of Outer Join for Oracle > Hi, > > All of the functionality is added and everything is checked into CVS. If > you find anything wrong, let me know, and I'll be glad to fix it. > > Regarding your comment about Oracle 9 users wanting to use the ANSI style > joins. I know it would add more properties (to the already large number), > but it might be nice to be able to specify Dialect specific properties. > This would allow the user to toggle which outer join style to use for this > Dialect. > > Jon... > > ----- Original Message ----- > From: "Gavin King" <ga...@ap...> > To: "Jon Lipsky" <jon...@xe...>; > <hib...@li...> > Sent: Friday, September 27, 2002 2:51 PM > Subject: Re: [Hibernate] Implentation of Outer Join for Oracle > > > > All very sound. The only likely objection is that Oracle 9 users might > want > > to use ANSI style joins for the few people who would have this issue can > > easily subclass OracleDialect. > > > > At some stage it would be really nice to develop a hierarchy of classes > that > > model SQL statements, eg. SQLUpdate, SQLSelect, SQLSelectOrderBy, etc.... > > > > At present Hibernate models SQL statements with java.lang.StringBuffer, > > which is what you get if you follow YAGNI too devoutly :( > > > > ----- Original Message ----- > > From: Jon Lipsky > > To: hib...@li... > > Sent: Friday, September 27, 2002 10:22 PM > > Subject: [Hibernate] Implentation of Outer Join for Oracle > > > > > > Hi Gavin, > > > > I finally have time try to add the Oracle joins stuff into the new > > refactored version of Hibernate in CVS. > > > > I want to run my ideas by you before I do them, to make sure you agree > (and > > to make sure I understand your refactorings correctly :-) > > > > 1) Refactor the outer join generation into a seperate class so that the > > current OuterJoinLoader calls a seperate class to actually create the SQL > > statement fragments. > > > > 2) Add the ability for a dialect to specify which OuterJoinGenerator to > use. > > > > 3) Add an OracleOuterJoinGenerator (based on the code I've already written > > for the 1.1 version of Hibernate). > > > > 4) Modify OuterJoinLoader so that it has two possible places it can add to > > the SQL statement. ie.. After the FROM part of the SQL is generated and > > after the WHERE clause. So, for example, in the CollectionLoader, when it > > is generating the SQL, it would do something like: > > > > sql = sqlSelect( > > // SELECT CLAUSE > > selectCollectionString(persister, alias) + > > ( joins==0 ? "" : ", " + selectString(associations) ), > > // FROM CLAUSE > > persister.getQualifiedTableName()+' '+alias, > > // OUTER JOINS PART 1 > > outerJoinStringAfterFrom(associations), > > // WHERE CLAUSE > > whereString( persister.getKeyColumnNames(), alias ), > > // OUTER JOINS PART 2 > > outerJoinStringAfterWhere(associations), > > // ORDER BY CLAUSE > > ( persister.hasOrdering() ) ? > > alias + '.' + persister.getSQLOrderByString() : > > null > > ); > > > > What do you think of that idea? Doing it this way wouldn't require the > > addition of an Environment variable like my previous solution, and it > would > > allow us to add other outer join strategies if needed. > > > > Jon... > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel |
From: Gavin K. <ga...@ap...> - 2002-09-27 23:16:10
|
> > > > Yes, but for various reasons the IDENTITY field is not the only field in > > > the key. The joys of retrofitting :-) > > > > So MS SQL can generate > > I just noticed that you had left this at the bottom of your last email. > Did something get cut off or not completed? > Thats what happens when you write emails at 3 am. I meant to express my interest in the fact that MS SQL can generate values that are unique, not for the whole table, but only for other rows with the same values in the other primary key fields. I never knew something like that existed... |
From: Gavin K. <ga...@ap...> - 2002-09-27 23:13:32
|
Heh, I'm a mathematician by training :) Edge / vertex are used in the sense of graph theory. So its a network where each edge has a certain capacity and a certain length. Like, for example, a network of water pipes. Of course, it doesn't do any useful computations its meant to be merely illustrative. I know its not a very good example. But I was tryng to steer clear of the very "typical" kinds of examples used for business computing..... ----- Original Message ----- From: "Boring, Jeff W, ALBAS" <jb...@at...> To: <hib...@li...> Sent: Saturday, September 28, 2002 3:22 AM Subject: [Hibernate] Network Demo > Could someone explain the objects and tables. I really don not understand the problem domain. How is vertex used here - math (The point at which the sides of an angle intersect), Astronomy (The highest point reached in the apparent motion of a celestial body), or Anatomy (The highest point of the skull)? None of these jive with "sink" or "source." Also, why does the edge table below need foreign keys to vertex? > > Thanks much, > > ----------------------------------------------------------------- TABLES > create table vertex ( > creationDate DATE, > name VARCHAR(50) not null unique, > strength FLOAT, > version_number INTEGER not null, > vertex_id BIGINT not null, > vertex_type VARCHAR(255) not null, > primary key (vertex_id)) > > create table edge ( > creationDate DATE, > edge_cpcty FLOAT, > edge_id BIGINT not null, > edge_length FLOAT, > name VARCHAR(50) not null unique, > sink BIGINT not null, > source BIGINT not null, > primary key (edge_id)) > > alter table edge add constraint > edgeFK1 foreign key (sink) references vertex > > alter table edge add constraint > edgeFK0 foreign key (source) references vertex > > create table hibernate_unique_key ( next_hi INTEGER ) > > insert into hibernate_unique_key values ( 0 ) > ----------------------------------------------------------------- > > ----------------------------------------------------------------- Classes > public class Edge { > private float length; > private String name; > private float capacity; > private Vertex source; > private Vertex sink; > private long key; > private Date creationDate = new Date(); > } > public class Vertex { > private Set incoming = new HashSet(); > private Set outgoing = new HashSet(); > private String name; > private long key; > private int version; > private Date creationDate = new Date(); > } > public class Source extends Vertex { > private float strength; > } > ----------------------------------------------------------------- > > Jeff Boring > Custom & Web Services Development > AT&T Labs > jb...@at... > (813) 878-3367 > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel |
From: Mark W. <mor...@SM...> - 2002-09-27 19:05:15
|
Jon Lipsky wrote: >Hi, > >All of the functionality is added and everything is checked into CVS. If >you find anything wrong, let me know, and I'll be glad to fix it. > >Regarding your comment about Oracle 9 users wanting to use the ANSI style >joins. I know it would add more properties (to the already large number), >but it might be nice to be able to specify Dialect specific properties. >This would allow the user to toggle which outer join style to use for this >Dialect. > Just to be clear, what exactly does someone using Oracle 9 have to do to use ANSI style joins? Thanks, -Mark |
From: Chris W. <cwi...@op...> - 2002-09-27 18:55:00
|
On Fri, 2002-09-27 at 12:33, Gavin King wrote: > You *have* to use version (2) because that version is called immediately > from save() rather than buffered for later. > > To make sure (2) gets called you need to: > ... Cool. I'll see what I can do. Thanks for the clear pointers. Chris -- Chris Winters (cwi...@op...) Java Developer |
From: Jon L. <jon...@xe...> - 2002-09-27 17:54:20
|
Hi, All of the functionality is added and everything is checked into CVS. If you find anything wrong, let me know, and I'll be glad to fix it. Regarding your comment about Oracle 9 users wanting to use the ANSI style joins. I know it would add more properties (to the already large number), but it might be nice to be able to specify Dialect specific properties. This would allow the user to toggle which outer join style to use for this Dialect. Jon... ----- Original Message ----- From: "Gavin King" <ga...@ap...> To: "Jon Lipsky" <jon...@xe...>; <hib...@li...> Sent: Friday, September 27, 2002 2:51 PM Subject: Re: [Hibernate] Implentation of Outer Join for Oracle > All very sound. The only likely objection is that Oracle 9 users might want > to use ANSI style joins for the few people who would have this issue can > easily subclass OracleDialect. > > At some stage it would be really nice to develop a hierarchy of classes that > model SQL statements, eg. SQLUpdate, SQLSelect, SQLSelectOrderBy, etc.... > > At present Hibernate models SQL statements with java.lang.StringBuffer, > which is what you get if you follow YAGNI too devoutly :( > > ----- Original Message ----- > From: Jon Lipsky > To: hib...@li... > Sent: Friday, September 27, 2002 10:22 PM > Subject: [Hibernate] Implentation of Outer Join for Oracle > > > Hi Gavin, > > I finally have time try to add the Oracle joins stuff into the new > refactored version of Hibernate in CVS. > > I want to run my ideas by you before I do them, to make sure you agree (and > to make sure I understand your refactorings correctly :-) > > 1) Refactor the outer join generation into a seperate class so that the > current OuterJoinLoader calls a seperate class to actually create the SQL > statement fragments. > > 2) Add the ability for a dialect to specify which OuterJoinGenerator to use. > > 3) Add an OracleOuterJoinGenerator (based on the code I've already written > for the 1.1 version of Hibernate). > > 4) Modify OuterJoinLoader so that it has two possible places it can add to > the SQL statement. ie.. After the FROM part of the SQL is generated and > after the WHERE clause. So, for example, in the CollectionLoader, when it > is generating the SQL, it would do something like: > > sql = sqlSelect( > // SELECT CLAUSE > selectCollectionString(persister, alias) + > ( joins==0 ? "" : ", " + selectString(associations) ), > // FROM CLAUSE > persister.getQualifiedTableName()+' '+alias, > // OUTER JOINS PART 1 > outerJoinStringAfterFrom(associations), > // WHERE CLAUSE > whereString( persister.getKeyColumnNames(), alias ), > // OUTER JOINS PART 2 > outerJoinStringAfterWhere(associations), > // ORDER BY CLAUSE > ( persister.hasOrdering() ) ? > alias + '.' + persister.getSQLOrderByString() : > null > ); > > What do you think of that idea? Doing it this way wouldn't require the > addition of an Environment variable like my previous solution, and it would > allow us to add other outer join strategies if needed. > > Jon... > |
From: Boring, J. W, A. <jb...@at...> - 2002-09-27 17:24:41
|
Could someone explain the objects and tables. I really don not = understand the problem domain. How is vertex used here - math (The point = at which the sides of an angle intersect), Astronomy (The highest point = reached in the apparent motion of a celestial body), or Anatomy (The = highest point of the skull)? None of these jive with "sink" or "source." = Also, why does the edge table below need foreign keys to vertex?=20 Thanks much, ----------------------------------------------------------------- TABLES create table vertex ( creationDate DATE,=20 name VARCHAR(50) not null unique,=20 strength FLOAT,=20 version_number INTEGER not null,=20 vertex_id BIGINT not null,=20 vertex_type VARCHAR(255) not null,=20 primary key (vertex_id)) =09 create table edge ( creationDate DATE,=20 edge_cpcty FLOAT,=20 edge_id BIGINT not null,=20 edge_length FLOAT,=20 name VARCHAR(50) not null unique,=20 sink BIGINT not null,=20 source BIGINT not null,=20 primary key (edge_id)) =09 alter table edge add constraint=20 edgeFK1 foreign key (sink) references vertex =09 alter table edge add constraint=20 edgeFK0 foreign key (source) references vertex =09 create table hibernate_unique_key ( next_hi INTEGER ) insert into hibernate_unique_key values ( 0 ) -----------------------------------------------------------------=20 ----------------------------------------------------------------- = Classes public class Edge { private float length; private String name; private float capacity; private Vertex source; private Vertex sink; private long key; private Date creationDate =3D new Date(); } public class Vertex { private Set incoming =3D new HashSet(); private Set outgoing =3D new HashSet(); private String name; private long key; private int version; private Date creationDate =3D new Date(); } public class Source extends Vertex { private float strength; } -----------------------------------------------------------------=20 Jeff Boring Custom & Web Services Development AT&T Labs jb...@at... (813) 878-3367 |
From: Gavin K. <ga...@ap...> - 2002-09-27 16:33:55
|
> Would implementing ClassPersister be the way to go for this? At first > (and uninformed) glance it would seems like all I'd need to do is > override insert() from EntityPersister and instead of setting the ID to > the IDENTITY value returned, set a particular field in the ID to the > IDENTITY value returned. Well, almost. Might be a little bit of extra fiddling because there are two versions of insert: (1) take an id and return nothing (2) take just the fields and return an id (meant for use with IDENTITY columns) You *have* to use version (2) because that version is called immediately from save() rather than buffered for later. To make sure (2) gets called you need to: * override getIdentifierGenerator() to return an instance of NativeGenerator (because its always Assigned for composite id classes) * override isIdentifierAssignedByInsert() to return true * Override insert() as you described. Return the id from this method. Oh, a couple more things: * EntityPersister is currently declared final and I will probably leave it that way so use delegation, not inheritence * I need to wire in a little bit of code to allow the mapping document to specify a ClassPersister implementation class (I'll do that tomorrow) * I changed the ClassPersister interface earlier today to generalize it a bit. Grab a CVS update. Gavin > > > Hold on.....somethings not right.....the IDENTITY column has to be unique of > > its own accord, right? > > Yes, but for various reasons the IDENTITY field is not the only field in > the key. The joys of retrofitting :-) So MS SQL can generate |
From: Chris W. <cwi...@op...> - 2002-09-27 15:58:13
|
On Fri, 2002-09-27 at 11:37, Gavin King wrote: > Damn! thats a tough one. I'm almost tempted to say that the best solution > would be to implement the new cirrus.hibernate.persister.ClassPersister > interface (in v1.1.1). This would be a decent solution if you just have a > couple of tables like this and you don't need to use outerjoin fetching or > the query language for those tables. (Well, actually you *could* probably > get nice and familiar with Hibernate's internals and wire in outerjoin > fetching and queries, I suppose.) I have a *ton* of tables like this (500+). But I already have a fairly sophisticated relationship and query framework setup in my code generator and was planning to continue using it, so the fact that I can't use the query language isn't a big deal. (Not having to do things a particular way is a huge benefit of Hibernate over other persistence schemes, IMO.) Would implementing ClassPersister be the way to go for this? At first (and uninformed) glance it would seems like all I'd need to do is override insert() from EntityPersister and instead of setting the ID to the IDENTITY value returned, set a particular field in the ID to the IDENTITY value returned. > Hold on.....somethings not right.....the IDENTITY column has to be unique of > its own accord, right? Yes, but for various reasons the IDENTITY field is not the only field in the key. The joys of retrofitting :-) Chris -- Chris Winters (cwi...@op...) Java Developer |
From: Gavin K. <ga...@ap...> - 2002-09-27 15:37:29
|
Damn! thats a tough one. I'm almost tempted to say that the best solution would be to implement the new cirrus.hibernate.persister.ClassPersister interface (in v1.1.1). This would be a decent solution if you just have a couple of tables like this and you don't need to use outerjoin fetching or the query language for those tables. (Well, actually you *could* probably get nice and familiar with Hibernate's internals and wire in outerjoin fetching and queries, I suppose.) Hold on.....somethings not right.....the IDENTITY column has to be unique of its own accord, right? ----- Original Message ----- From: "Chris Winters" <cwi...@op...> To: <hib...@li...> Sent: Saturday, September 28, 2002 1:38 AM Subject: [Hibernate] generated field as part of composite key > I just recently discovered Hibernate and have been extremely pleased > with it so far. It will probably be replacing our Entity Beans scheme > shortly. > > We're fitting Hibernate to an existing schema which is a little unusual: > every table in the system uses a composite key. I've created a composite > key object without a problem, but for some tables there's an additional > wrinkle as they use a generated field (e.g., IDENTITY in MS SQL) as part > of the composite key. > > I don't expect Hibernate would have native support for something like > this, so how would I go about implementing it? > > Thanks, > > Chris > > -- > Chris Winters (cwi...@op...) > Java Developer > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel |
From: Gavin K. <ga...@ap...> - 2002-09-27 15:28:56
|
This problem was solved by private email....the problem was an old DB2 driver. ----- Original Message ----- From: "Boring, Jeff W, ALBAS" <jb...@at...> To: <hib...@li...> Sent: Friday, September 27, 2002 11:53 PM Subject: [Hibernate] AbstractMethodError running NetworkDemo > Help please, newbee here > > I am trying to get the NetworkDemo running in my IDE of choice (WSAD). Running it produces the follow. Any help would be greatly appreciated. Thanks, > > [INFO] DatastoreImpl - -Mapping resource: cirrus/hibernate/eg/Vertex.hbm.xml > [INFO] XMLHelper - -Parsing XML: unknown system id > [INFO] Environment - -loaded properties from resource hibernate.properties > [INFO] Environment - -using java.io streams to persist binary types > [INFO] Environment - -JVM proxy support: true > [WARN] Collection - -Attribute "order-by" ignored in JDK1.3 or less > [WARN] Collection - -Attribute "order-by" ignored in JDK1.3 or less > [INFO] DatastoreImpl - -Mapping resource: cirrus/hibernate/eg/Edge.hbm.xml > [INFO] XMLHelper - -Parsing XML: unknown system id > [INFO] Dialect - -Using dialect: class cirrus.hibernate.sql.DB2Dialect > [INFO] DriverManagerConnectionProvider - -Hibernate connection pool size: 2 > [INFO] DriverManagerConnectionProvider - -Using driver: COM.ibm.db2.jdbc.app.DB2Driver at URL: jdbc:db2:sample > [INFO] DriverManagerConnectionProvider - -Connection properties: {user=jboring, password=bsa79UF} > [INFO] PreparedStatementCache - -prepared statement cache size: 100 > [INFO] SessionFactoryImpl - -Use outer join fetching: true > java.lang.AbstractMethodError: COM/ibm/db2/jdbc/app/DB2DatabaseMetaData.supportsResultSetType > at cirrus.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:134) > at cirrus.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:94) > at cirrus.hibernate.impl.DatastoreImpl.buildSessionFactory(DatastoreImpl.java:6 0) > at cirrus.hibernate.eg.NetworkDemo.main(NetworkDemo.java:29) > Exception in thread "main" > > Jeff Boring > jb...@at... > (813) 878-3367 > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel |
From: Chris W. <cwi...@op...> - 2002-09-27 15:18:12
|
I just recently discovered Hibernate and have been extremely pleased with it so far. It will probably be replacing our Entity Beans scheme shortly. We're fitting Hibernate to an existing schema which is a little unusual: every table in the system uses a composite key. I've created a composite key object without a problem, but for some tables there's an additional wrinkle as they use a generated field (e.g., IDENTITY in MS SQL) as part of the composite key. I don't expect Hibernate would have native support for something like this, so how would I go about implementing it? Thanks, Chris -- Chris Winters (cwi...@op...) Java Developer |
From: Boring, J. W, A. <jb...@at...> - 2002-09-27 13:54:54
|
Help please, newbee here I am trying to get the NetworkDemo running in my IDE of choice (WSAD). = Running it produces the follow. Any help would be greatly appreciated. = Thanks, [INFO] DatastoreImpl - -Mapping resource: = cirrus/hibernate/eg/Vertex.hbm.xml [INFO] XMLHelper - -Parsing XML: unknown system id [INFO] Environment - -loaded properties from resource = hibernate.properties [INFO] Environment - -using java.io streams to persist binary types [INFO] Environment - -JVM proxy support: true [WARN] Collection - -Attribute "order-by" ignored in JDK1.3 or less [WARN] Collection - -Attribute "order-by" ignored in JDK1.3 or less [INFO] DatastoreImpl - -Mapping resource: = cirrus/hibernate/eg/Edge.hbm.xml [INFO] XMLHelper - -Parsing XML: unknown system id [INFO] Dialect - -Using dialect: class cirrus.hibernate.sql.DB2Dialect [INFO] DriverManagerConnectionProvider - -Hibernate connection pool = size: 2 [INFO] DriverManagerConnectionProvider - -Using driver: = COM.ibm.db2.jdbc.app.DB2Driver at URL: jdbc:db2:sample [INFO] DriverManagerConnectionProvider - -Connection properties: = {user=3Djboring, password=3Dbsa79UF} [INFO] PreparedStatementCache - -prepared statement cache size: 100 [INFO] SessionFactoryImpl - -Use outer join fetching: true java.lang.AbstractMethodError: = COM/ibm/db2/jdbc/app/DB2DatabaseMetaData.supportsResultSetType at = cirrus.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:1= 34) at = cirrus.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:9= 4) at = cirrus.hibernate.impl.DatastoreImpl.buildSessionFactory(DatastoreImpl.jav= a:60) at cirrus.hibernate.eg.NetworkDemo.main(NetworkDemo.java:29) Exception in thread "main"=20 Jeff Boring jb...@at... (813) 878-3367 |
From: Gavin K. <ga...@ap...> - 2002-09-27 13:27:46
|
Someone has requested this once before. I think my answer was something like: "if you want to implement it, go ahead".... I think it is a little bit of scope creep but we do already define some indexes so i'm relaxed about that. My view is that you can't expect SchemaExport to replace a DBA who knows how to properly performance tune a database for a production system. Not sure quite what the best approach would be. Perhaps an index-name attribute of <column> element. That way multiple columns could be mapped to the same index.... ----- Original Message ----- From: "Yaron Zakai" <ya...@id...> To: <hib...@li...> Sent: Saturday, September 28, 2002 12:19 AM Subject: [Hibernate] Defining column index for properties > Hi, > > In a use case where the database schema is almost fully controlled by the > mapping file, does it makes sense to add the functionality of defining an > index on a single property? The next level would of course be defining an > composite index, using several properties/columns. > > Is this in the scope of Hibernate? > > Thanks, Yaron. > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel |
From: Yaron Z. <ya...@id...> - 2002-09-27 13:15:00
|
Hi, In a use case where the database schema is almost fully controlled by the mapping file, does it makes sense to add the functionality of defining an index on a single property? The next level would of course be defining an composite index, using several properties/columns. Is this in the scope of Hibernate? Thanks, Yaron. |
From: Gavin K. <ga...@ap...> - 2002-09-27 12:51:37
|
All very sound. The only likely objection is that Oracle 9 users might want to use ANSI style joins for the few people who would have this issue can easily subclass OracleDialect. At some stage it would be really nice to develop a hierarchy of classes that model SQL statements, eg. SQLUpdate, SQLSelect, SQLSelectOrderBy, etc.... At present Hibernate models SQL statements with java.lang.StringBuffer, which is what you get if you follow YAGNI too devoutly :( ----- Original Message ----- From: Jon Lipsky To: hib...@li... Sent: Friday, September 27, 2002 10:22 PM Subject: [Hibernate] Implentation of Outer Join for Oracle Hi Gavin, I finally have time try to add the Oracle joins stuff into the new refactored version of Hibernate in CVS. I want to run my ideas by you before I do them, to make sure you agree (and to make sure I understand your refactorings correctly :-) 1) Refactor the outer join generation into a seperate class so that the current OuterJoinLoader calls a seperate class to actually create the SQL statement fragments. 2) Add the ability for a dialect to specify which OuterJoinGenerator to use. 3) Add an OracleOuterJoinGenerator (based on the code I've already written for the 1.1 version of Hibernate). 4) Modify OuterJoinLoader so that it has two possible places it can add to the SQL statement. ie.. After the FROM part of the SQL is generated and after the WHERE clause. So, for example, in the CollectionLoader, when it is generating the SQL, it would do something like: sql = sqlSelect( // SELECT CLAUSE selectCollectionString(persister, alias) + ( joins==0 ? "" : ", " + selectString(associations) ), // FROM CLAUSE persister.getQualifiedTableName()+' '+alias, // OUTER JOINS PART 1 outerJoinStringAfterFrom(associations), // WHERE CLAUSE whereString( persister.getKeyColumnNames(), alias ), // OUTER JOINS PART 2 outerJoinStringAfterWhere(associations), // ORDER BY CLAUSE ( persister.hasOrdering() ) ? alias + '.' + persister.getSQLOrderByString() : null ); What do you think of that idea? Doing it this way wouldn't require the addition of an Environment variable like my previous solution, and it would allow us to add other outer join strategies if needed. Jon... |
From: Jon L. <jon...@xe...> - 2002-09-27 12:23:20
|
Hi Gavin, I finally have time try to add the Oracle joins stuff into the new = refactored version of Hibernate in CVS. I want to run my ideas by you before I do them, to make sure you agree = (and to make sure I understand your refactorings correctly :-) 1) Refactor the outer join generation into a seperate class so that the = current OuterJoinLoader calls a seperate class to actually create the = SQL statement fragments. 2) Add the ability for a dialect to specify which OuterJoinGenerator to = use. 3) Add an OracleOuterJoinGenerator (based on the code I've already = written for the 1.1 version of Hibernate). 4) Modify OuterJoinLoader so that it has two possible places it can add = to the SQL statement. ie.. After the FROM part of the SQL is generated = and after the WHERE clause. So, for example, in the CollectionLoader, = when it is generating the SQL, it would do something like: sql =3D sqlSelect( // SELECT CLAUSE selectCollectionString(persister, alias) + ( joins=3D=3D0 ? "" : ", " + selectString(associations) ), // FROM CLAUSE persister.getQualifiedTableName()+' '+alias, // OUTER JOINS PART 1 outerJoinStringAfterFrom(associations), // WHERE CLAUSE whereString( persister.getKeyColumnNames(), alias ), // OUTER JOINS PART 2 outerJoinStringAfterWhere(associations), // ORDER BY CLAUSE ( persister.hasOrdering() ) ? alias + '.' + persister.getSQLOrderByString() : null ); What do you think of that idea? Doing it this way wouldn't require the = addition of an Environment variable like my previous solution, and it = would allow us to add other outer join strategies if needed. Jon... |
From: Gavin K. <ga...@ap...> - 2002-09-26 18:09:23
|
Does anyone know why the following query, which is good in DB2, is no good in Oracle: SELECT c.container_id FROM Simple sim2_, Container c, manyToMany man0_ WHERE (sim2_.count_=2 and man0_.elt=sim2_.id_ and c.container_id=man0_.container_id2 and man0_.list_index= (SELECT count(*) FROM manyToMany man1_ WHERE c.container_id=man1_.container_id2)-1) Hibernate generates that SQL for this query: select c from c in class Container where c.manyToMany[ c.manyToMany.size - 1].count = 2 which is kinda useful. Gavin |
From: Gavin K. <ga...@ap...> - 2002-09-25 14:35:46
|
Why don't you just grab Sun's FSContext JNDI provider, as other people have been using. Its very easy to use. Alternatively, you could write yourself an InMemoryContext JNDI provider (i've done it before its quite trivial). The advantage of this approach is your code would be portable to a J2EE environment if/when necessary. > Oh yeah, it'd also be cool if there were a way to share mapping resources > with multiple session factories more or less the way you do with properties. If you wanna hack away at cirrus.hibernate.cfg.Configuration and implement this I'm happy to accept this change into the codebase. P.S.To make the cfg XML format a bit more typesafe, I have toyed with allowing properties to be configured like: <connection> <url>jdbc:db2:test</url> <driver-class>db2.Driver</driver-class> <username>foo</username> <password>bar</password> </connection> <jndi> <class>sun.FSInitialContextProvider</class> <url>C:\jndi</url> </jndi> etc, instead of <property name="hibernate.connection.url">jdbc:db2:test</property> ..... If anyone wants to take this on, I'd appreciate it, since I have some more immediate issues ATM. You should be able to implement this in a clever way, so that Configuration doesn't need to know exactly what properties there are; just how to map from an element path to a property name. ----- Original Message ----- From: "Craig Goss" <cg...@ma...> To: "Hibernate Mailing List" <hib...@li...> Sent: Wednesday, September 25, 2002 11:44 PM Subject: [Hibernate] Named SessionFactory in cfg.xml > Hi Gavin: > > The demands of the project I'm working on are such that the persistence > layer will provide support services for (1) a web site that communicates > with an ejb server via stateless session beans wrapping a DAO and (2) a > stand-alone application that directly accesses the same DAO without the > session wrapper. Databases will be separate, but the data model needs to be > available in both places. Because of this dual identity, I need to be able > to configure Hibernate differently depending on environment. > > The way I understand it, in my DAO, I'd be better off using a SessionFactory > that has been preconfigured and bound to JNDI via hibernate.cfg.xml. No > problem there as you've adequately allowed for this via named session > factories. In my stand-alone application, I'd like to be able to do the > same, but there's no JNDI around so I wonder if my only option is to use > datastore and properties files for configuration? > > Looking at the code it seems like named session factories ought to be > possible (and useful) without JNDI. If JDNI names were instead configured > using a property (connection.jndiname?) then it seems that one could specify > named factories in the config, keep all config info in the xml file and > obtain the correct factory either by querying SessionFactoryObjectFactory or > going against JNDI. > > What I was hoping was that I'd be able to do something like this: > > hibernate.cfg.xml ===================== > <hibernate-configuration> > <session-factory name="localfactory"> > <property > name="connection.driver_class">org.hsqldb.jdbcDriver</property> > <property > name="connection.url">jdbc:hsqldb:c:/data/hsql/test</property> > <property name="connection.username">sa</property> > <property name="dialect">cirrus.hibernate.sql.HSQLDialect</property> > <!-- mapping files --> > <mapping resource="example.hbm.xml"/> > </session-factory> > > <session-factory name="jndifactory"> > <property name="jndiname">/env/daofactory</property> > <property name="jta.UserTransaction"> > java:comp/UserTransaction/ > </property> > <property name="connection.datasource">/ejbds/</property> > <property name="dialect">cirrus.hibernate.sql.HSQLDialect</property> > <!-- mapping files --> > <mapping resource="example.hbm.xml"/> > </session-factory> > </hibernate-configuration> > > This would allow me to set up my DAO more or less as follows. > > // Abstract inherited by DAO subclasses > public BaseHibernateDAO(String config) throws DAOException { > protected SessionFactory factory; > try { > new Configuration(config).configuration.configure(); > } catch (HibernateException e) { > throw new DAOException(e); > } > } > > // Java beans would acquire factory via SessionFactoryObjectFactory > public HibernateDAO(String config) extends BaseHibernateDAO throws > DAOException { > super(config); > factory = SessionFactoryObjectFactory.getInstance("localfactory"); > } > > // EJB session beans would acquire factory via JNDI > public EJBHibernateDAO(String config) extends BaseDAO throws DAOException { > super(config); > try { > factory = (SessionFactory) new > InitialContext().lookup("/env/daofactory"); > } catch (NamingException e) { > throw new DAOException(e); > } > } > > Oh yeah, it'd also be cool if there were a way to share mapping resources > with multiple session factories more or less the way you do with properties. > I don't think the DTD allows this right now, so in the example I gave above > I would have to duplicate all mapping resource declarations despite the fact > that both factories use the same set of resources. > > Forgive me if I've got anything wrong here -- I'm still quite new to > Hibernate and this is coming off the top of my head. Maybe there are ways > to do this already and I'm simply not seeing them. > > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel |
From: Gavin K. <ga...@ap...> - 2002-09-25 14:07:18
|
A set of strings isn't an association... So I'm still confused why cascade() is called. ----- Original Message ----- From: "Mark Woon" <mor...@SM...> To: "Gavin King" <ga...@ap...> Sent: Wednesday, September 25, 2002 10:56 PM Subject: Re: [Hibernate] Problem with <component> element > Gavin King wrote: > > >>>cirrus.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:897) > >>> > >>> > > at cirrus.hibernate.impl.Cascades$2.cascade(Cascades.java:37) > > at cirrus.hibernate.impl.Cascades.cascade(Cascades.java:130) > > at cirrus.hibernate.impl.SessionImpl.cascade(SessionImpl.java:1770) > > at cirrus.hibernate.impl.SessionImpl.doSave(SessionImpl.java:576) > > at cirrus.hibernate.impl.SessionImpl.save(SessionImpl.java:458)<< > > > >Huh???? What on earth is being cascaded here? You have no associations in > >the mapping you showed me! > > > > Sorry. > > Yes, there was an association: > > <class name="Foo" table="Foos"> > <id name="id" column="id" type="string" unsaved-value="null"> > <generator class="assigned" /> > </id> > <property name="name" /> > <set role="altNames" table="AltNames"> > <key column="fooId" type="string" /> > <element column="name" type="string" /> > </set> > <component name="subComp" class="SubComp"> > <property name="version" column=version" /> > <property name="value" column="value" /> > </component> > </class> > > > -Mark |
From: Craig G. <cg...@ma...> - 2002-09-25 13:45:00
|
Hi Gavin: The demands of the project I'm working on are such that the persistence layer will provide support services for (1) a web site that communicates with an ejb server via stateless session beans wrapping a DAO and (2) a stand-alone application that directly accesses the same DAO without the session wrapper. Databases will be separate, but the data model needs to be available in both places. Because of this dual identity, I need to be able to configure Hibernate differently depending on environment. The way I understand it, in my DAO, I'd be better off using a SessionFactory that has been preconfigured and bound to JNDI via hibernate.cfg.xml. No problem there as you've adequately allowed for this via named session factories. In my stand-alone application, I'd like to be able to do the same, but there's no JNDI around so I wonder if my only option is to use datastore and properties files for configuration? Looking at the code it seems like named session factories ought to be possible (and useful) without JNDI. If JDNI names were instead configured using a property (connection.jndiname?) then it seems that one could specify named factories in the config, keep all config info in the xml file and obtain the correct factory either by querying SessionFactoryObjectFactory or going against JNDI. What I was hoping was that I'd be able to do something like this: hibernate.cfg.xml ===================== <hibernate-configuration> <session-factory name="localfactory"> <property name="connection.driver_class">org.hsqldb.jdbcDriver</property> <property name="connection.url">jdbc:hsqldb:c:/data/hsql/test</property> <property name="connection.username">sa</property> <property name="dialect">cirrus.hibernate.sql.HSQLDialect</property> <!-- mapping files --> <mapping resource="example.hbm.xml"/> </session-factory> <session-factory name="jndifactory"> <property name="jndiname">/env/daofactory</property> <property name="jta.UserTransaction"> java:comp/UserTransaction/ </property> <property name="connection.datasource">/ejbds/</property> <property name="dialect">cirrus.hibernate.sql.HSQLDialect</property> <!-- mapping files --> <mapping resource="example.hbm.xml"/> </session-factory> </hibernate-configuration> This would allow me to set up my DAO more or less as follows. // Abstract inherited by DAO subclasses public BaseHibernateDAO(String config) throws DAOException { protected SessionFactory factory; try { new Configuration(config).configuration.configure(); } catch (HibernateException e) { throw new DAOException(e); } } // Java beans would acquire factory via SessionFactoryObjectFactory public HibernateDAO(String config) extends BaseHibernateDAO throws DAOException { super(config); factory = SessionFactoryObjectFactory.getInstance("localfactory"); } // EJB session beans would acquire factory via JNDI public EJBHibernateDAO(String config) extends BaseDAO throws DAOException { super(config); try { factory = (SessionFactory) new InitialContext().lookup("/env/daofactory"); } catch (NamingException e) { throw new DAOException(e); } } Oh yeah, it'd also be cool if there were a way to share mapping resources with multiple session factories more or less the way you do with properties. I don't think the DTD allows this right now, so in the example I gave above I would have to duplicate all mapping resource declarations despite the fact that both factories use the same set of resources. Forgive me if I've got anything wrong here -- I'm still quite new to Hibernate and this is coming off the top of my head. Maybe there are ways to do this already and I'm simply not seeing them. |
From: Gavin K. <ga...@ap...> - 2002-09-25 12:13:20
|
>>cirrus.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:897) at cirrus.hibernate.impl.Cascades$2.cascade(Cascades.java:37) at cirrus.hibernate.impl.Cascades.cascade(Cascades.java:130) at cirrus.hibernate.impl.SessionImpl.cascade(SessionImpl.java:1770) at cirrus.hibernate.impl.SessionImpl.doSave(SessionImpl.java:576) at cirrus.hibernate.impl.SessionImpl.save(SessionImpl.java:458)<< Huh???? What on earth is being cascaded here? You have no associations in the mapping you showed me! If cascade() is getting called for a mapping with no associations, theres something very wrong, so please send me a copy of the code that reproduces this..... ----- Original Message ----- From: "Mark Woon" <mor...@SM...> Cc: "Hibernate Mailing List" <hib...@li...> Sent: Wednesday, September 25, 2002 9:47 PM Subject: Re: [Hibernate] Problem with <component> element > Gavin King wrote: > > >Curious. > > > >I managed to reproduce an NPE just like this, but from update(), not > >save()...... > > > >Are you sure it originated in save() .... can you show me a stack trace > >please. > > > Yes, I'm doing a save(). Stack trace: > > java.lang.NullPointerException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > cirrus.hibernate.helpers.ReflectHelper.get(ReflectHelper.java:183) > at > cirrus.hibernate.type.ComponentType.getPropertyValue(ComponentType.java:161) > at > cirrus.hibernate.impl.SessionImpl.removeCollectionsFor(SessionImpl.java:846) > at > cirrus.hibernate.impl.SessionImpl.removeCollectionsFor(SessionImpl.java:808) > at cirrus.hibernate.impl.SessionImpl.doUpdate(SessionImpl.java:952) > at > cirrus.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:897) > at cirrus.hibernate.impl.Cascades$2.cascade(Cascades.java:37) > at cirrus.hibernate.impl.Cascades.cascade(Cascades.java:130) > at cirrus.hibernate.impl.SessionImpl.cascade(SessionImpl.java:1770) > at cirrus.hibernate.impl.SessionImpl.doSave(SessionImpl.java:576) > at cirrus.hibernate.impl.SessionImpl.save(SessionImpl.java:458) > at misc.Test.test(Test.java:258) > at misc.Test.main(Test.java:89) > > Note that it says ReflectHelper.java:183 instead of 169 because I added > a bunch of debug code to figure out what was null. > > >I'm concerned that the testsuite didn't show this / these problems :( > > > > > Yeah, that confused me too, since I checked the test suite and saw that > there were tests for this, and thought it was something I was doing.... > > -Mark > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel |