[Hibernate] question on H2 roadmap progress

2003-01-09 Thread Russell Smyth
I am looking to create a custom id generator for my project and noticed
several planned "enhancements" for H2 in the id generator area. Two are
specific generator cases, so I am not concerned with them. What I would like
to know is how far has the planning gone for

* named id generator parameters 

so that I can make sure my generator is forward compatable?

mainly, I want to make sure I can support the named params, especially as my
generator will require params.

Can I plan for it with some simple assumptions? something like one of these
choices:

craete getters/setters for named params (ie for the above example
setMaxLo(int maxLo)

or

a Constructor or Configure method that accepts an xml doc/string or a
name=value pair map


Thanks in advance
Russell


---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel



[Hibernate] [PATCH] make Query.setMaxResults() work for all databases

2002-12-23 Thread Russell Smyth
I have submitted a patch to the SF patch manager which allows
Query.setMaxResults() to work
even on databases which do not support PreparedStatement.setMaxRows(), such
as SAPDB (which we must work with).

The change is small, but it should increase compatablity greatly.

My patch also includes removing the workaround from the test for this
feature for SAPDB.


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel



RE: [Hibernate] problems with date comparision

2003-01-18 Thread Russell Smyth
How are you creating your "Date" object? If you are creating a date
that reperesents for example 01/01/2003 (no time) 

then searching your database for > this date will find matches for 
any 01/01/2003 entries that are not 00:00:00 time.


> -Original Message-
> From: Timothy Kettering [mailto:[EMAIL PROTECTED]
> Sent: Friday, January 17, 2003 5:39 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [Hibernate] problems with date comparision
> 
> 
> 
> Good suggestion.  I checked the database and it's in datetime 
> format.  
> It's storing the time too because the time shows up properly 
> when I do 
> entries, and it also gets retrieved properly if I retrieve an single 
> entry to match a timestamp.
> 
> I even checked the hbm.xml file - timestamp as well.  Any other 
> possibilities?
> 
> -tim
> 
> 
> On Friday, January 17, 2003, at 06:44 PM, Ken Robinson wrote:
> 
> > The first thought that comes to mind is that your database 
> column is 
> > not
> > storing
> > time information, i.e. year/month/day only.  You might want 
> to take a 
> > look
> > at that.
> >
> > -Original Message-
> > From: Timothy Kettering [mailto:[EMAIL PROTECTED]
> > Sent: Friday, January 17, 2003 4:35 PM
> > To: [EMAIL PROTECTED]
> > Subject: [Hibernate] problems with date comparision
> >
> >
> > I'm using Hibernate with a program that I'm developing, and one my
> > small test units turned up a weird issue that I'm not sure 
> if is a bug
> > or i'm screwing up somewhere...
> >
> > This is the query I have:
> >
> > be = sess.find("select entry from entry 
> in class " +
> > 
> "com.blackcore.blogserver.general.BlogEntry
> > where entry.timestamp >
> > ? " +
> > "and entry.blog.id = ?" +
> > " order by entry.timestamp asc limit ?",
> > params, types);
> >
> >  From what I figure, this should return all entry objects with a
> > timestamp (actually an date object) greater than the supplied date
> > parameter.
> >
> > But what happened at first was that it returned (first in 
> the List) the
> > entry with the matching timestamp supplied, rather than the next one
> > with a greater timestamp.  In the process of trying to 
> figure out what
> > went on, I manually increased the Date object by 100,000 
> milliseconds
> > to see if I could get it to skip the first object returned.  No such
> > luck.  Still returned the first object with the matching timestamp.
> > Heres an output of the debug strings I put in, it outputs 
> the timestamp
> > of the parameter before and after incrementing it.  And you can see
> > from the output below that it STILL returns #227, in spite 
> of the fact
> > that it's less than the post-modification timestamp!
> >
> > before the modification: 1042042968000
> >   after the modification: 1042052968000
> > Id is: 227 // first object returned - this shouldnt be returned.
> > Time is: 1042042968000
> > Id is: 228 // second object returned .. this should be the first!
> > Time is: 1042519996000
> >
> > If i set it to try to try to retrieve the next X entry objects after
> > the most recent entry object in the database, (without advancing the
> > timestamp parameter), it returns only last entry object.  
> But if I do
> > the timestamp advance before passing in the parameter, it returns
> > nothing, which is the right behavior.
> >
> > The strange thing is that I have a method with is exactly 
> the same as
> > this, but returns a List of entry objects that are LESS than the
> > timestamp.  and it works just as expected, no problems with 
> that.  Its
> > just weird.  Anyone have any insights?  I'm using hibernate 
> 1.2.2 with
> > a mysql database.
> >
> > -tim
> >
> >
> >
> > ---
> > This SF.NET email is sponsored by: Thawte.com - A 128-bit 
> supercerts 
> > will
> > allow you to extend the highest allowed 128 bit encryption 
> to all your
> > clients even if they use browsers that are limited to 40 bit 
> > encryption.
> > Get a guide 
> > here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en
> > ___
> > hibernate-devel mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/hibernate-devel
> >
> >
> > ---
> > This SF.NET email is sponsored by: Thawte.com - A 128-bit 
> supercerts 
> > will
> > allow you to extend the highest allowed 128 bit encryption 
> to all your
> > clients even if they use browsers that are limited to 40 bit 
> > encryption.
> > Get a guide 
> > here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en
> > ___
> > hibernate-devel mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/hibernate-devel
> >
> 
> 
> 
> ---
> This SF.NET email is sponsored by: Thawte.com -

[Hibernate] discriminator-value='null'

2003-01-17 Thread Russell Smyth
is there any way to specify a discriminator-value of null or not-null? I
have
a situation where I need one class mapped to rows in a table that have a
value in a particular column, and a different class mapped to rows that have
null in the same column.

  This is legacy data, so I do not have the ability to add a column to the
db to differentiate.

Thanks
Russell


---
This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will
allow you to extend the highest allowed 128 bit encryption to all your 
clients even if they use browsers that are limited to 40 bit encryption. 
Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel



[Hibernate] Possible additions to Lifecycle interface

2003-01-09 Thread Russell Smyth
We ran into a situation that we belived we could solve through the Lifecycle
methods, but we found something lacking.. currently there is

onSave
onUpdate
onDelete
onLoad

all of these are called BEFORE the appropriate action is performed. What we
would like is a complementary set of AFTER calls

onSaved
onUpdated
onDeleted
onLoaded

our current main use is a field that is write-once. We would like to
dissallow "re-setting" of the field once it is set, but by dissallowing
resetting the property, hibernate cannot re-instantiate the object either!
so we would like to do something like
onLoad(){
  allowAccess = true;
}
setValue(){
  if(!allowAccess){
throw new YouCantDoThatException();
  }
  ...
}
onLoaded(){
  allowAccess = false;
}

I would be willing to create a patch to add these methods, but I didnt want
to go through the exercise if the Hibernate team would reject the concept.

Thanks
Russell


---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel