as if it had been loaded.
Cheers
Troy
- Original Message -
From: Gavin King [EMAIL PROTECTED]
To: Troy McKinnon [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, November 02, 2003 8:09 PM
Subject: Re: [Hibernate] updating exiting objects with a new clone
G I hate this. I think
Hibernate 2.1 provides the Session.replicate() method for doing data import.
Eventually this will work very nicely with the XML I/O stuff (as soon as
we have the I as well as the O) to allow full data migration. The
Atlassian guys (Ara Abrahamian, mainly) have an implementation of
One of these days, for an experiment, we should try developing
OREntityPersister, a new mapping strategy that uses db-side inheritance
in object-relational databases. Would be cool :)
Christian Bauer wrote:
On 30 Oct (13:02), Wojciech wrote:
I'd like to know if the oracle dialect uses the
No. String concatenation is very fast in Java.
Eric Pugh wrote:
Hi all,
Is this any faster (in a real world sense):
users = retrieveSession().find(from
org.apache.fulcrum.security.spi.hibernate.HibernateSimpleUser su where
su.name=?, userName, Hibernate.STRING);
then this:
users =
P.S. To anyone who didn't notice, I released 2.1 beta 5 last night.
This was going to be called rc1, but rc1 needs to have TreeCache integrated.
However, its a good build finally, and I think now might be a good time
to start upgrading development (not production) systems to 2.1.
peace
Gavin
.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gavin King
Sent: Thursday, October 30, 2003 5:12 PM
To: hibernate list
Subject: [Hibernate] 2.1 beta 5
P.S. To anyone who didn't notice, I released 2.1 beta 5 last night.
This was going to be called rc1
Please check the JavaDoc. There are two properties which are
system-level. This is one of them.
Joseph Toth wrote:
Using hibernate 2.0.3
I initialize hibernate via a Properties object.
Configuration configuration = new
Configuration().addClass(Panel.class).setProperties(properties);
I don't have a big problem with a cvs build. Proxool users can easily
sort out for themselves
what version they want to use. If I can get a Proxool jar in my hands,
that uses cglib2, along
with a patch that integrates cglib2 in Hibernate, that would be just
beautiful :-)
Thanks for sorting
To implement this requires an id generator with dependencies upon
EJB APIs. ie. it requires a session bean. Hibernate does not
currently have dependencies upon EJB.
This is an appropriate thing to maintain as part of your application.
Pragasam, Mukund (Consultant) wrote:
ID Generator
If you
Wouldn't that mean that we would get both versions of CGLIB in our lib
directory?
Perhaps its better to just wait until Proxool has also upgraded. Perhaps
we can
put some pressure on them to get up to date.
Chris Nokleberg wrote:
On Tue, Oct 28, 2003 at 08:03:06PM +1100, Gavin King wrote
It is just a warn that i'm sure is irrelevant to you.
BINGHAM, EARL (SBCSI) wrote:
I receive a runtime error during the initial setup of the persisting objects
to my oracle database. These include:
16:53:38,992 WARN SessionFactoryImpl:262 - Problem opening output
stylesheet - databinding
Ah. hm. I am actually ready to release 2.1rc1. Just waiting on
Bela's stuff.
Exactly how beta is beta?
Gavin, with the API changes it's probably quickest if I put a patch
together. Let me know when you want to do this and whether it should be
against HEAD or some branch. I would only
OK. You wanna make a patch?
The CVS branch is v21branch.
Chris Nokleberg wrote:
Gavin King wrote:
Ah. hm. I am actually ready to release 2.1rc1. Just waiting on
Bela's stuff.
Exactly how beta is beta?
Not very beta? :-) Of course there may be some minor API changes going
forward
Really, the correct approach is to use lazy initialization
together with open session in view.
Alternatively, you can use an OUTER JOIN FETCH query to
retrieve the users more efficiently.
Andrew Zeon wrote:
Hi,
I have a class called CompanyImpl which represents a company. Within this
class I
Guys, I have removed all hard dependencies upon commons-lang, as was
discussed in Aarhus, by forking the useful bits (the nestable exception
stuff) into net.sf.hibernate. We still need to distribute commons-lang
for now, because JCS requires it. New code should not use commons-lang.
it first of course ;)
/max
Gavin King wrote:
Guys, I have removed all hard dependencies upon commons-lang, as was
discussed in Aarhus, by forking the useful bits (the nestable
exception stuff) into net.sf.hibernate. We still need to distribute
commons-lang for now, because JCS requires it. New
not in the loop, why was commons-lang ditched? Remove
another dependency? c-l getting to large?
Just so I know for future efforts...
Eric
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Gavin
King
Sent: Saturday, October 25, 2003 12:28 PM
To: Max Rydahl Andersen
from A where b.size3 is not valid HQL! Do you mean:
from A b where b.size3
What exactly are you trying to point out here?
* there is a missing space b/w b1 and where??
* the order of the comparison is reversed?
If the latter, just write:
from A b where 3 b.size
If the former, please
from A where b.size3 is not valid HQL! Do you mean:
from A b where b.size3
What exactly are you trying to point out here?
* there is a missing space b/w b1 and where??
* the order of the comparison is reversed?
If the latter, just write:
from A b where 3 b.size
If the former, please
You need to upgrade to Hibernate 2.1, and understand the
select-before-update mapping
attribute.
Urberg, John wrote:
Hibernate also seems to always assume objects from different sessions are
dirty. (I'm using saveOrUpdate() in 1.2.5. Maybe this has changed in 2.*?)
Anyway, I need to work
Please check the JavaDoc for the semantics of onUpdate().
Questions like these should be directed to the user forum, not the devel
list. TIA.
kiuma wrote:
Hello,
I'm using an hilo generator under jboss but the Lifecycle.onUpdate is
not called. while all the onSave onLoda etc are correctly
You need to be using Hibernate 2.1. It is covered in the doco for 2.1.
Cameron Braid wrote:
I couldn't find any info on this subject on the hibernate site. There
are examples of simple criteria based queries, but nothing with
relationships.
Does anyone have any code that achieves something like
? If so which repo ?
Cheers,
Cameron
-Original Message-
From: Gavin King [mailto:[EMAIL PROTECTED]
Sent: Thursday, 2 October 2003 6:30 PM
To: Cameron Braid
Cc: [EMAIL PROTECTED]
Subject: Re: [Hibernate] I need help with the Criteria API
when using joins
You need to be using Hibernate
You are mistake.
Are you sure you didn't declare the column as timestamp instead of
datetime in MySQL?
Laurent Fleuriot wrote:
Hi,
I have a problem with timestamp.
My problem is that I have an object java with 2 dates( start and end).
When I insert the object, the date end is null BUT
Ooops. Sorry. I mean to say mistaken LOL.
Gavin King wrote:
You are mistake.
---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
hibernate-devel
It is all available through the property Type. You can cast to
AbstractComponentType any Type
that returns true for isComponentType().
Cameron Braid wrote:
I wish to be able to query the hibernate class meta data for component
classes.
Is this something that can be added in ?
Currently I
Cheers Dean!
It was actually really hard doing the interview, I'm glad it came out
okay :-)
Dean Des Rosiers wrote:
Eveyone,
I'd like to congratulate Gavin on a very good interview with TSS. It was a
real kick to see Gavin in the flesh, as it were. Personally, I'd like to
wish Hibernate the
This is because your Interceptor.instantiate() method does not set the
identifier that is passed in.
John Kristian wrote:
The code in Hibernate2 -r v21branch got worse (from my point of view)
a few days ago, and has stayed worse. Perhaps y'all knew this
already, in which case I apologize for
hibernate.use_reflection_optimizer is one of those evil system-level
properties in Hibernate ... it MUST be specified in hibernate.properties
or with java -D.
(I hate this.)
Mao, Dean (IHG) wrote:
Hmm, I must be doing something wrong... on my P4 1.7Ghz, I'm around 12
seconds for load time. I
p.s. the BulkBean class also now throws an exception detailing which
property failed, so you can print a better error message.
Hooray! You have no idea how much forum posts this will save us
---
This sf.net email is sponsored
Looks very much like you are using an outdated Hibernate version. Which
version does the log report?
Prasad Iyer wrote:
Hi,
I have this two joined-subclass in a mapping file.
This two joined-subclass has one-to-many relationship between them and
is giving me a
problem, when I am trying to create
Yes, this is the plan!
Aapo Laakkonen wrote:
In cglib cvs there exists new reflect package. Should Hibernate take
advantage of these?
E.g. Using FastConstructor for persisting object construction.
---
This sf.net email is sponsored
Jason Carreira wrote:
Is there a document describing the semantics of the CacheProvider
Interface? For instance:
Oh shit Jason, you're so right. I really need to document our cache
stuff better. I _started_
writing something once and didn't get far
What does is the lock() method do (is it
Mauro, I consider that this is now high-priority. We *really*
need to get this stuff into the build.
I *really* appreciate your work on this! Like ... a lot ...
Thanks
Gavin
Mauro Sérgio Silva wrote:
Hi Cristian,
Now I'm with Some time to update the pt-br translation of Hibernate
I don't understand why you would not just implement an
IdentifierGenerator for this...
kiuma wrote:
I want that my interceptor set the id of an object on method onSave,
but if i try to do it Hibernate dumps this message:
identifier of an instance of it.lispa.turismo.persist.UserH altered
from
The was a bug regarding key-many-to-one and the JCS cache, which is
supposed to be fixed in Hibernate 2.1. This should fix your problem.
(You should certainly be able to cache a composite-id mapping, were
it not for this bug.)
Yin Shi wrote:
Hi all,
Could anybody talk about how to use User
Thanks Kevin!
Copyright is always owned by the code author unless explicitly assigned to
someone else, or unless the code is a work for hire. My contract with
JBoss states explicitly that work I do on Hibernate is not for hire and
I retain all copyright on Hibernate. Any code that anyone else
is now guaranteed.
peace
Gavin King
http://hibernate.org
---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
hibernate-devel mailing list
[EMAIL PROTECTED
_orders_of_magnitude_ in some transactions!
Gavin.
jiesheng zhang wrote:
Hi,
I once suspect that hibernate take too much time in
doing dirty check during session flush. However Gavin
king and other hibernate-user disagreed with me.
I did a simple performance testing to verify the dirty
check performance
All the foreign tables should be cached indefinately. There are only a
couple rows in each.
Is a way for hibernate to, when loading PanelDemographics, the sql generated
would just select the id's of the foreign tables, then grab the objects from
the cache.
Absolutely. Enable JCS on the
0.3 seconds is an awfully long time for loading _one_row_!
Joseph Toth wrote:
Ahha, outer-join=false was the key ...
Now it only takes 0.3 seconds to load that object! Thank you so much!
-Original Message-
From: Gavin King [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003
I should also point out that 0.13ms per object is an
absolute best possible case for the database access.
This is reading straight out of Oracle's cache on a
local machine, with no concurrent threads. In a real
system, the database access would be MUCH slower than
that!
Gavin King wrote:
Listen
Why not initialize the proxy with the data that came back from the
collection query? The expensive part is going to the db, we have the
data, why not use it?
I agree that this is better.
BTW, I have a patch for a proxy initialize-on-equals=true/false
setting, but I can't submit it until sf's
Great!
No, I plan no more changes to the DTD. Extensions, perhaps. But there
is now too much existing Hibernate apps that depend upon the current
metadata format.
David Channon wrote:
I have been fine tuning release 2 of the Middlegen plugin and implementing
functionality that is to be found
Andrea, I was actually going to make the validation even
fussier, by throwing an exception when validation fails, instead of just
logging an ERROR.
This is to avoid a particular large class of problems I see in the forum
I'm a bit scared to let users turn off validation completely! I'm not
(contactID, email, type)
values (?, ?, ?)
Hibernate: insert into phonenumber (contactID, num,
type) values (?, ?, ?)
2003-9-12 12:31:04 ...
Info: db source is commited
--- Gavin King [EMAIL PROTECTED] wrote:
the transaction. My code is like this
Tranaction tx=sessiob.beginTransaction
Forget about the 500 transactions. The problem is
this: with 300-500 objects in the session cache, a
single transaction( with an single object inserted)
takes about one second.
It simply does *not* take a second to dirty check 500 objects, dude.
Nowhere even close. If you think you can prove
the transaction. My code is like this
Tranaction tx=sessiob.beginTransaction();
foo.setField(newValue);
tx.commit();
Well, obviously it is not like that, since that code does not
load any objects into the session.
1. When the commit() is called, will the hibernate
loop through every object in
If you configure a polymorphic association to use proxies,
this is what happens.
If you need to do a typecast, either:
(1) use outer-join=true on the association OR
(2) call session.load(Subtype.class, proxy.getId() )
to narrow the proxy type.
we can't possibly know a subtype w/o hitting the
Just call sess.flush() ... you can call it at any time :)
Chandrasekhar Ambadipudi wrote:
I have a transaction like this
Transaction tx = sess.beginTransaction();
sess.save(obj)
sess.connection() // and one prepared
I think it is a bug in the Postgres implementation of JDBC batch updates.
Gerry Duprey wrote:
Howdy,
I'm new to hibernate and have run into a problem almost immediatly in
my test
program while trying to save a new object/record. I've tried this with
Hibernate 2.0.3 and 2.1b3. This is on
method like this defined in my
class, is it possible with Hibernate though?
Thanks,
Warner
On Wednesday, September 10, 2003, at 08:26 AM,
[EMAIL PROTECTED] wrote:
On Tuesday, September 9, 2003, at 07:07 PM, Gavin King wrote:
Theres nothing particularly special about this. Just map it as you
Should be 99.9% backward compatible. There are some little changes
that might trip up a very small number of users, but they are mainly in
the realm of bugfixes.
Vivian Fonger wrote:
Hi everyone,
Can anyone give me the difference between version 2.0.3 and version
2.1.?? Will I have any
Yes, I think the forum is sucking up a lot of traffic.
But we will get this more active soon.
David Channon wrote:
The activity on this List has just abput died for me.
Has there been any changes of late? (Maybe the new forum is working so well
this list is not
required - just asking).
Cheers
There are two separate issues:
1) Hibernate only tries to optimize materializing proxies during
equals() for the case of reference equality, which is really not all
that useful.
2) It breaks when trying to do so.
You are completely right and that code is absolutely misguided.
I have
I'm not certain exactly what you are asking. Yes, the Interbase jdbc
driver sucks and does not allow PreparedStatement caching last time I
checked. but this is not a Hibernate-related problem. The Interbase driver
sucks whether you are using Hibernate or NOT.
I think the latest pure Java driver
No, it is not possible at present. See the Road Map for the planned new
join feature, which will allow this kind of thing.
hello,
is it possible to define a joined subclass that has subclasses ? i have
tried, but i get a the following error:
org.xml.sax.SAXParseException: Element class
This is ALL as expected. You can not load the same database row as two
different objects. That is pathalogical.
You can call session.evict(info) if you wish to reload it as a different
class.
Gavin
Hi all,
I'm hoping someone can point me in the right direction. I'm using the
David, exactly what version of Middlegen is the Hibernate plugin working
against? The new (codehaus) version?
I have a few extensions to the Middlegen plugin (that I have been using
locally). There have
been quite afew users of the plugin and thus this email is a request for
comments as to
and
review progress.
Cheers David.
- Original Message -
From: Gavin King [EMAIL PROTECTED]
To: David Channon [EMAIL PROTECTED]
Cc: hibernate list [EMAIL PROTECTED]
Sent: Tuesday, September 02, 2003 3:41 PM
Subject: Re: [Hibernate] Middlgen plugin wish list.
David, exactly
The where attribute takes an *SQL* fragment, not a HQL fragment, And the
braindead parser will recognize a function iff you nest the paren right up
close like this: exists(, instead of this: exists (.
If you want to use subqueries, etc in where fragments, you MUST be using
Hibernate 2.1.
Hi.
It is an absolutely essential part of Hibernate's architecture that you
don't share instances between concurrent transactions!
net.sf.hibernate.HibernateException: Illegal attempt to associate a
collection with two open sessions
I get the preceding error when...
A user issues a query to
but what if theres just one collection?! (ie. the common case). Then
Hibernate would be adding an extra useless condition to the SQL, and
potentially slowing things down.
Aside: An interesting question that I need to ask a real DBA someday is:
should Hibernate generate schemas with an index on
I've assigned the patch to Max. He can commit it since I have gone cold
turkey until the book is finished. Until then, Max is the only one allowed
to commit to Hibernate core ;)
Realizing all of the great work everyone is doing for 2.1, could I slip
this patch onto the radar screen for
Dammit!!
I just comitted an entire query by example API!
I think I need help.
Must write book..g..
I'll take a look at it tonight ,)
Could you provide a small test case with the patch ?
/max
Gavin King wrote:
I've assigned the patch to Max. He can commit it since I
I should note one more thing: this is for *versioned* data only! Otherwise
we have no way to relate an instance to its snapshot after
deserialization.
Heh, I was going to post about this.
I'm not sure whether this is good or bad but I added it for feedback.
Its a performance optimization:
No. Transaction.rollback() does NOT restore the state of the session to
the state prior to Transaction.begin(). You should close the Session after
rolling back a transaction.
Thanks
For the help really appreciate that.
Wanted to ask one more thing is nested transaction possible in Hibernate.
In my opinion:
* splitting the tools out of the Hibernate core was the one of the best
things we ever did - it keeps the download small enough and external
dependencies under control (Hibernate was starting to look very bloated)
* Maven looked great until I actually tried to use it and realized
Its just part of the Dialect. If you have suggestions for improvements to
the Dialect, why not submit a patch to JIRA
I am using Hibernate 1.2.3 with Postgres 7.2.3.
In the past when using Hibernate with MySql after a vertain size of String
type the generated DDL would oncvert from VARCHAR
I'm very openminded this patch. However, you need to submit it
(a) in diff format, so I can see exactly what changed ... and use patch to
patch the curent code!
(b) upload it to JIRA, not post it to the list
Thanks
Gavin
|-+---
| |
A quick not to everyone,
Please don't email me at the .gov.au address, or at the .expert.com address
anymore.
I can be reached on [EMAIL PROTECTED] for now.
**
Any personal or sensitive information contained in this email and
Well, we've made huge progress on the 2.1 roadmap. So I'm considering
finidhing the caching stuff, bumping the multi-table mappings stuff to 2.2
and then going into bugfix mode.
But anyway, getting to the point.we now have a fully working Criteria
query API, with full support for
I implemented pluggable caching last night, and run Hibernate on top of
Tangosol Coherence cache for the first time. Nice.
I'll publish the CoherenceCacheProvider on the Wiki!
**
Any personal or sensitive information contained
Thanks.
have a look at v21branch, and see what was done with Oracle9Dialect.
|-+---
| | Serge Knystautas|
| | [EMAIL PROTECTED] |
| | Sent by:
where is your cascade=save-update???!
|-+---
| | Prasad Iyer |
| | [EMAIL PROTECTED] |
| | Sent by:|
| | [EMAIL PROTECTED]|
|
Umm this problem is not occurring in the test suite.
would you mind putting together something very simple to help reproduce it?
thanks!
|-+---
| | Eric Pugh [EMAIL PROTECTED] |
| | Sent by:
You have mapped both the type property and the origin property to the
same column (ENTITY_TYPE). You may do this, but you must tell Hibernate
which property to use when INSERTing/UPDATEing (by setting one of them to
insert=false update=false).
You should remiove objects from associations when deleting them.
|-+---
| | jiesheng zhang |
| | [EMAIL PROTECTED]|
| | Sent by:|
| |
Go get 2.0.2.
This one slipped through our usually excellent quality control ;)
---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and
Why not just look in the source of SessionImpl?
|-+---
| | Mark Woon |
| | [EMAIL PROTECTED] |
| | Sent by:|
| | [EMAIL
The class named Employee must be in the classpath.
Correct syntax is:
java net.sf.hibernate.tool.class2hbm.MapGenerator my.package.name.Employee
or, use the batch file in the bin/ directory
|-+---
| | Madhesh [EMAIL
I guess it would be easily possible to turn the cache *off*.
But what do you do about circular references?
You get exposed to stack overflows w/o a cache.
|-+---
| | Andrea Aime [EMAIL PROTECTED] |
| |
Why don't you add it to the Wiki, amd then we can work it into the docs
somewhere, if it fits.
|-+---
| | Mark Woon |
| | [EMAIL PROTECTED] |
| | Sent by:
Sounds like a great idea. I'll give whatever help i can find time for.
Especially, are you interested in an IoC-based DAO framework?
|-+---
| | Jason Carreira|
| | [EMAIL PROTECTED] |
|
Mike, the impression I'm getting among our users is that people are really
keen on the Spring Fwk, for showing how things _fit_together_. It gives
them a starting point for
ok, how do I use all this cool POJO stuff to build an actual
_application_
Now, from what I understand, I think the Spring
Your solution would work.
Alternatively, there is support for a collection of anys. Use the (badly
named) many-to-any tag. I think this is the best way for you.
|-+---
| | Dhananjay Nene [EMAIL PROTECTED]|
| |
you can actually hack the delimiter parameter to do this.
|-+---
| | Oliver Wehrens |
| | [EMAIL PROTECTED]|
| | Sent by:|
| |
FWIW, I have been using the microsoft driver successfully in my current
project (which uses Hibernate *very* nontrivially). However, it *is* very
slow compared to the other drivers we tested (esp. with large result sets).
If your client cares about performance, I strongly recommend a third party
It seems that if I use table-per-class, I am going to get hit
with thirty queries every time I do a select of the superclass, is that
correct?
Correct
But if I use table-per-subclass with joined-subclass/, I will
get two selects -- one for the superclass result set and one for each table
David Channon has implemented support for Dialect-specific SQL functions in
the HQL select clause. This means that we need to go though the dialects,
one by one, and fill in the standard functions for that Dialect. David has
already done this for Oracle. It would be very nice if some platform
The other problem and perhaps Gavin has some input on this, is that
when you make use of the proxy feature, it appears that the proxy
keeps a refernce to the session that was used to create that proxy.
So if the connection is getting closed between SB calls this proxy
object fails when passed to
Yick! You are probably right. PreparedStatement must retain the value of
setMaxRows(). I had kinda assumed it only applied for the very next
executeQuery() method, but probably not. Thats a VERY nasty bug. Would you
submit a bug report please?
(Workaround is to disable Hibernate
What JDBC driver are you using? (I've got a funny feeling it might be
Oracle, which does not differentiate between null and the empty string in
its driver.)
Hibernate doesn't do this. Your code, or possibly your JDBC driver might do
it.
Put a breakpoint in your setter method to discover exactly
Yes, this is the most compelling case; ie. a 1 - to - few relationship.
However, I would be
interested to see actual timings showing that the single enormous ResultSet
is actually
quicker than the 3000 + 1 seperate selects. I'm not saying for sure that it
isn't in your case,
but whenever I have
The statement gets closed when the session is closed. Do you think we
really need to close it earlier?
Juozas Baliuka
BitSet creates small arrays It is important for some JVM
implemetations (not trivial to handle memory fragmentation),
but possible optimizes nothing on current implementations.
These arrays don't get very big anyway, I expect (you dont have
objects with 100 properties. I can't imagine it being
Try using the Hibernate clob type.
You can use Hibernate.createClob() to instantiate a new fake Clob.
Note that JDBC driver support for Clobs is patchy and inconsistent and I do
not guarantee that the Clob support will work on all platforms.
Nup, it's not allowed currently. It would probably be pretty trivial to
support in the same way we support the order-by attribute ... simply have a
where attribute of a collection mapping. If you want to try implementing
that, please feel welcome since many people have asked for this. Currently
Check out the open session in view pattern for these kind of simple
applications.
The basic idea is to use a servlet filter to open and close sessions.
I was just having a look over the source of BitSet. It doesn't seem to me
that it would be more performant than a simple boolean[]. (It would
probably consume less _memory_, but that doesn't seem to be a very
critical issue here.) Juozas, why do you expect there to be a performance
gain from using
301 - 400 of 573 matches
Mail list logo