Hello all,
While trying to fix one of Envers issues, I have encountered difficulties
inserting one-to-one relation mapped with join table. All audit entities
generated by Envers follow EntityMode.MAP pattern. Simple hibernate-core
test case - https://gist.github.com/lukasz-antoniak/5929345 - fails
Hello Steve,
In general Envers does not support formula columns. Probably we should save
formula value to audit table. This can be tricky and I have to think it
over. Copying formula column to audit entity would not produce expected
result in all cases (e.g. time functions used in formula expressi
Hello Team,
What do you think about adding "on-delete" attribute to
"key-many-to-one-element" type in HBM mapping? This would allow
generation of "ON DELETE CASCADE" clause.
Context: "HHH-7807 - Deleting Revision Entity" and "HHH-8052 -
Possibility to deleted audits/revisions in an orderly way".
Hello Community,
Yesterday I have pushed my changes done to apply new metamodel in Envers code:
https://github.com/lukasz-antoniak/hibernate-core/tree/envers-metamodel. It's
just a working branch so you can see lots of TODO's
and code commented out. The task of Envers migration is quite complex
Hello Team,
In Envers code we use ReflactionManager and XProperty#getAnnotation(Class)
quite often. While working on metamodel branch, I
have started replacing all those calls with
JandexHelper#getValue(AnnotationInstance, String, Class) method. The code
became
less type safe and grew in size
y
>
>
>
> On 7 Sep 2012, at 22:05, Łukasz Antoniak wrote:
>
>> Hello Steve,
>>
>> Just wanted to let you know that I am trying to migrate Envers to new
>> metamodel. I have asked below question on IRC, but without any
>> response. At the m
t will isolate needed changes to just
> Envers. Basically the changes at some point will be using the JAXB binding
> model rather than DOM.
>
>
> On Fri 24 Aug 2012 01:55:55 AM CDT, Łukasz Antoniak wrote:
>>
>> Hello Steve,
>>
>> I think I could start wo
Hello Steve,
I think I could start working on metamodel branch at the beginning of
September. Is it acceptable for you? I don't want to
postpone 4.1.7 release. JIRA task has been already registered:
https://hibernate.onjira.com/browse/HHH-7490.
Best Regards,
Lukasz
__ Information fro
.path" ) is only going to work in very
> specific environments (and unfortunately often not the environments that you
> want to do JTA).
> 3) Class path scanning for files like this is assuming the environment is
> set up a certain way (worried about something like JBoss's Vir
Hello all,
I have implemented basic proof of concept regarding JTA platform recognition.
You can find the initial suggestion here:
https://github.com/lukasz-antoniak/hibernate-core/commit/3df34efad32ceed98a98d2af2c831119b4261773.
Implementation notes:
1) Defining JAR archives in classes extend
Hello Steve/Guenther,
@Steve: Thank you for clear explanation. Will create delegate
interface and come back to you. Not sure if it would be backward
compatible, have to check that :).
> This is because HQL apparently does not support the suppression of the "AS"
> keyword for aliases, so this que
Hello Guenther,
I totally agree that user could adapt his query to use "AS" keyword, while we
focus on keeping getLimitString() most fast and
simple as possible.
I think that my modifications are more or less ready and you can view them
here:
https://github.com/lukasz-antoniak/hibernate-core/
Hello Guenther,
I have discussed with Strong Liu about aliases and it seems that HQL and
Criteria API queries always add an alias to selected
column or subquery (to @Formula expressions as well). IMO we could assume that
aliases are preceded with "AS" keyword.
Steve agreed to delegate binding
Two more notes:
1. Maybe we could select columns without alias by number instead of adding
"pageN" alias? Example: "SELECT rid1688_, 2,
deviati16_1688_, 4, sortindex1688_ FROM query WHERE __hibernate_row_nr__ >= ?
AND __hibernate_row_nr__ < ?". Will have to check if
SQL Server supports such syn
Hello Guenther,
The following commit in general describes my thoughts:
https://github.com/lukasz-antoniak/hibernate-core/commit/fa8427937f5751170714ec97ac059bee9efd8cff
It probably needs some more tuning. Feel free to modify and test. I'm not sure
if adding "TOP(100)PERCENT" expression would not
Hello all,
Release 4.1.4 contained few fixes to
SQLServer2005Dialect#getLimitString(String, boolean) method. The main JIRA
issue (which has
links to other related tickets) is HHH-7019.
Quincy Leung added recently a comment about moving formula expressions to GROUP
BY which causes query to fai
uld be more accurate.
> Why would the third query fall into
> supportsRowValueConstructorSyntaxInInList?
Taken into consideration the grow of Dialect class and based on the table
posted here:
http://lists.jboss.org/pipermail/hibernate-dev/2012-May/008511.html.
Steve Ebersole pisze:
>
One additional note:
Where clause| Oracle | PostgreSQL | MySQL
--
WHERE (a1, b1) = ( 1, 1 ) | Fail | Pass| Pass
-
Hello Community,
Really quick question. There are quite few SQL syntax tricks similar to "row
value construct".
CREATE TABLE test ( a1 NUMBER, b1 NUMBER );
SELECT * FROM test WHERE (a1, b1) = ( 1, 1 ); -- Fails on Oracle
SELECT * FROM test WHERE (a1, b1) IN ( ( 1, 1 ), ( 2, 2 ) ); -- Passes on O
Hello all!
I have just a very short question regarding concurrency aspects when temporary
tables are utilized to process multi-table bulk
operations. I am trying to refactor part of Envers code which currently
executes SELECT FOR UPDATE and UPDATE, to process with a
single UPDATE statement. Th
We figure out whether data of a single property has changed in
SinglePropertyMapper#mapToMapFromEntity(SessionImplementor,
Map, Object, Object). So the comparison is based on equals()
method. I wanted to change this to:
public boolean mapToMapFromEntity(SessionImplementor session, Map data, Obj
Totaly agree that expecting null to be equal to empty string in Java model is
wrong.
IMO he has spotted that when null string reference is replaced with an empty
string, Envers creates new revision. From database
perspective (Oracle) two records does not differ in any way. This could be
actual
Hello,
Tests with ";INIT=CREATE SCHEMA IF NOT EXISTS ENVERS_AUDIT" appended to
connection string should for sure run only agains H2. This
basically creates second schema for audit tables. Not sure if other RDBMS
systems provide similar option. Shall I move this test
to src/test/main? There is
Hello all,
I would also vote for fixing connection sharing issue as soon as possible.
If this bug gets resolved, I will fix HHH-7017 in few minutes :).
Regards,
Lukasz
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org
Steve, I have created a JIRA issue
(https://hibernate.onjira.com/browse/HHH-7090) and assigned it to you. Why do
you think that we
should not fix this in the upcoming release? I have also noticed that
auto-closing feature of SharedSessionBuilder does not work
as documented in JavaDoc. Please s
I totally agree with you guys :). However, when I do something like:
if (FlushMode.isManualFlushMode(session.getFlushMode())) {
Session temporarySession = null;
try {
temporarySession = ((Session)
session).sessionWithOptions().transactionContext()
Thanks Steve for such a descriptive replay. I have played a little with
SessionBuilder and probably solved the issue. Because of
great importance of
AuditProcess#doBeforeTransactionCompletion(SessionImplementor) method, please
verify my commit:
https://github.com/lukasz-antoniak/hibernate-core
Hi all,
I have a question regarding SessionFactoryImplementor.openTemporarySession()
(bug HHH-7017). As observed in non JTA environment
with manual flush mode enabled, and 'hibernate.connection.autocommit' disabled,
temporary session is not getting committed.
How/when should I commit it manual
Yes, https://hibernate.onjira.com/browse/HHH-3088 describes the behavior.
From the perspective of hibernate-core module this cannot be easily resolved.
Fetching related objects would influence performance. But from Envers point of
view, we might actually execute a query
and produce a warning m
Hi all!
Lately I have been working on HHH-6942 JIRA issue. Envers behaves differently
when detached object is updated with new collection and persisted by invoking
Session.merge() or Session.saveOrUpdate()
methods.
SQL statements executed by Session.merge():
14:53:47,031 DEBUG SQL:104 - select
Welcome!
Lately I have been trying to add Session.isDirty(Object) method
(HHH-5054). Could somebody comment on test case and solution -
https://github.com/lukasz-antoniak/hibernate-core/commit/9f39a4a98d34e119f37c90d3953fe083c795bf6a
? IMO adding and removing relations between objects might wo
Well, I would vote for making things simple, and leaving InExpression as
it is. BTW passing more than 1000 elements in IN clause sounds evil :).
Regards,
Lukasz
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman
Hi all!
Recently I had a closer look at HHH-1123 issue. This bug affects both -
Criteria API and HQL. I have introduced
Dialect#maximumInExpressionElements() method which returns maximum
number of allowed elements in a single SQL IN clause, or null treated as
infinite. The change of InExpressi
Pull request submitted: https://github.com/hibernate/hibernate-core/pull/211
Fill free to comment Steve :). Maybe introducing a new Service is not
necessary. Anyway, it can be quickly removed.
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
nds(InputStreamReader streamReader);
> }
>
>
> We could even supply 2 impls, one for "required semicolon as separator" and
> another for "continuation symbol". And allow users to develop and supply
> their own for other situations.
>
>
> On Sun 06
Welcome!
Last time I have been trying to improve the way that Hibernate extracts
statements from "import.sql" script. My intention was to support
multiline SQL instructions (HHH-2403), quoted strings, multiline
comments etc. After developing quite simple ANTLR-based parser, I have
realized tha
)" );
>>> registerColumnType( Types.VARCHAR, "clob" );
>>>
>>> Steve, what do you think? Is it too late to make this change for 4.0.0?
>>>
>>> [1] Table 11-1 of Oracle® Database JDBC Developer's Guide and Reference,
>>&
I have forgotten to mention that Oracle supports LONG to LOB migration.
See:
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14249/adlob_long_lob.htm
http://download.oracle.com/docs/cd/B10500_01/appdev.920/a96591/adl08lon.htm
Regards,
Łukasz Antoniak
Welcome Community!
I have just subscribed to the list and wanted to discuss HHH-6726 JIRA
issue.
Gail Badner wrote
(http://lists.jboss.org/pipermail/hibernate-dev/2011-October/007208.html):
HHH-6726 (Oracle : map TextType to clob and ImageType to blob)
https://hibernate.onjira.com/browse/HHH-67
39 matches
Mail list logo