API differences in Hibernate ORM 5.1 vs 5.3
by Gail Badner
Hi,
There were lots of differences in the compatibility report, so as a first
step, I've excluded packages/classes that I considered SPI, internal, or
"grey area". This reduced the the differences to a more manageable amount.
You can see a summary of the incompatibilities along with suggested
mitigation at [1].
The report is attached to [1], along with a zip with instructions for
running the report.
I believe there are some "false positives" in the report, and I have
documented them in the section, "False Positives?".
Feel free to comment on the article.
Thanks,
Gail
[1]
https://developer.jboss.org/wiki/HibernateORMBinaryCompatibilityBetween51...
4 days, 22 hours
IP banned from forum
by Gunnar Morling
Hi,
Is anyone banning users from the forum? I am getting "A ban has been
issued on your IP address."
I don't think banning by IP is a good strategy as many users will have
dynamic IPs from their hoster's shared pool, so it's a random game to
hit an IP previously banned due to some other user's spam.
Thanks,
--Gunnar
5 days, 4 hours
New CI machine preview
by Sanne Grinovero
You're all welcome to play with http://54.225.162.168/
however please keep these in mind:
- it's not the final machine: don't put too much effort in creating
nice build scripts as we'll reset it to clean state soon. We *might*
be able to store jobs defined so far, but we might choose not to.
- domain name should be coming: ci.hibernate.org ..not sure when, got
no replies so far from.
- authentication: just click on login, it will use OAuth2 to request
your identity via your GitHub account. Permissions to create new jobs,
edit existing jobs, run a build manually depend on your github account
be part of the Hibernate organization (or not, in which case you have
read only status)
At this stage I'd like to get a feeling if the hardware is powerful
enough, and also we need to select which other plugins we want to use,
I'm looking especially to:
- static analysis reports
- pull requests integration
both are relatively undefined, we can of course start simple and
improve later.. just checking this fits basic needs now.
Sanne
2 months, 2 weeks
Unable to release :(
by Steve Ebersole
I ran the 6.0 Alpha5 release. All the tasks completed fine except I was
not able to upload the "dist" to Sourceforge nor the docs to JBoss. All
artifacts are pushed to BinTray.
5 years, 8 months
Re: [hibernate-dev] run a single unit test speed up?
by Jason Pyeron
I got it down to BUILD SUCCESSFUL in 2m 32s
27 actionable tasks: 5 executed, 22 up-to-date
By using
./gradlew :hibernate-core:test --tests org.hibernate.test.annotations.cid.CompositeIdFkGeneratedValueIdentityTest
Package___________________________ Tests Duration Success rate
org.hibernate.test.annotations.cid 1____ 0.586s__ 100%
For an approximate 250x slow down compared to the test execution, sigh.
> -----Original Message-----
> From: hibernate-dev-bounces(a)lists.jboss.org <hibernate-dev-bounces(a)lists.jboss.org> On Behalf Of Jason
> Pyeron
> Sent: Wednesday, April 22, 2020 4:48 PM
> To: 'Hibernate Dev' <hibernate-dev(a)lists.jboss.org>
> Subject: [hibernate-dev] run a single unit test???? do I really have to manually put -x for every task
> I do not want?
>
> Does anyone know how to get a single unit test to run without building a battleship too? Tried in
> eclipse too.
>
> ./gradlew test --tests org.hibernate.test.annotations.cid.CompositeIdFkGeneratedValueIdentityTest
>
> ... 5 minutes later ...
>
> FAILURE: Build failed with an exception.
>
> * What went wrong:
> Execution failed for task ':documentation:test'.
> > No tests found for given includes:
> [org.hibernate.test.annotations.cid.CompositeIdFkGeneratedValueIdentityTest](--tests filter)
>
> * Try:
> Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log
> output. Run with --scan to get full insights.
>
> * Get more help at https://help.gradle.org
>
> Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
> Use '--warning-mode all' to show the individual deprecation warnings.
> See https://docs.gradle.org/4.10.3/userguide/command_line_interface.html#sec:...
>
> BUILD FAILED in 4m 38s
> 36 actionable tasks: 35 executed, 1 up-to-date
>
> --
> Jason Pyeron | Architect
> PD Inc |
> 10 w 24th St |
> Baltimore, MD |
>
> .mil: jason.j.pyeron.ctr(a)mail.mil
> .com: jpyeron(a)pdinc.us
> tel : 202-741-9397
>
>
>
>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
5 years, 8 months
Trying to understand the significance and use of the sequence methods in Dialect
by Jason Pyeron
Other than the javadocs, are these documented anywhere?
* public String getSequenceNextValString(String sequenceName)
* public String getSelectSequenceNextValString(String sequenceName)
I have been following their usage throughout the codebase, but it is not easy.
Is getSequenceNextValString only used in place of single values? E.g. INSERT INTO NEW_USER VALUES (SEQ_USER.NEXTVAL, 'Adams', 'John') ? Or are there other uses?
Is getSelectSequenceNextValString only used to get the "batch" for Hibernate's future issuance of ids?
The reason I am asking is we would like to leverage the MS SQL Server's sp_sequence_get_range . By using the approach of using the stored procedure for Hibernate's allocation and otherwise using an increment by 1 allows higher efficiency with the Hibernate based application and prevent breaking legacy access to the table/use of the sequence. This topic was unclearly broached in HHH-10130. Internet research below...
Take the following example:
CREATE SEQUENCE [dbo].[hibernate_sequence2]
AS [bigint]
START WITH 1
INCREMENT BY 1
CACHE 200
;
CREATE TABLE [MyTable2]
(
[ID] [bigint] PRIMARY KEY NOT NULL DEFAULT (NEXT VALUE FOR [dbo].[hibernate_sequence2]),
[Title] [nvarchar](64) NOT NULL
);
insert into MyTable2 (Title) values ('test 1');
insert into MyTable2 (Title) values ('test 2');
insert into MyTable2 (Title) values ('test 3');
insert into MyTable2 (Title) values ('test 4');
select * from MyTable2;
--ID Title
--1 test 1
--2 test 2
--3 test 3
--4 test 4
DECLARE @range_first_value_output sql_variant ;
declare @range_size int=50+1;
DECLARE @sequence_increment sql_variant ;
declare @range_last_value sql_variant;
EXEC sys.sp_sequence_get_range
@sequence_name = N'[dbo].[hibernate_sequence2]'
, @range_size = @range_size
, @range_first_value = @range_first_value_output OUTPUT
, @sequence_increment = @sequence_increment OUTPUT
, @range_last_value = @range_last_value OUTPUT ;
SELECT @range_first_value_output AS FirstNumber, @sequence_increment as sequence_increment, @range_last_value as range_last_value ;
--FirstNumber sequence_increment range_last_value
-- 5 1 55
insert into MyTable2 (Title) values ('test 5');
select * from MyTable2;
--ID Title
--1 test 1
--2 test 2
--3 test 3
--4 test 4
--56 test 5
I know there are issues of "knowing" the @SequenceGenerator(allocationSize), but I will assume a fixed 50 for now.
Internet research and other useless links...
1: Not hibernate, but same goal - https://groups.google.com/forum/#!topic/ebean/wG6VyVfEMQk
2: Not helpful - https://stackoverflow.com/questions/17780394/hibernate-identity-vs-sequen...
3: Closest Hibernate Hit - https://hibernate.atlassian.net/browse/HHH-10130
4: My google searches - https://www.google.com/search?safe=off&q=%22sp_sequence_get_range%22+hibe... and https://www.google.com/search?safe=off&q=%22sp_sequence_get_range%22+jpa
5: An interesting discussion, but not applicable - https://hibernate.atlassian.net/browse/HHH-10560
6: Sequences Added to SQL Server Dialect - https://hibernate.atlassian.net/browse/HHH-8440
7: My JIRA search - https://hibernate.atlassian.net/browse/HHH-6950?jql=(text%20~%20sequence%...
-Jason
--
Jason Pyeron | Architect
PD Inc |
10 w 24th St |
Baltimore, MD |
.mil: jason.j.pyeron.ctr(a)mail.mil
.com: jpyeron(a)pdinc.us
tel : 202-741-9397
5 years, 8 months
Re: [hibernate-dev] [hibernate/hibernate-orm] HHH-10956 test cases and fix (#3368)
by Jason Pyeron
Github has been down for a while, so moving to mailing list.
> Hi @pdinc-oss ,
>
> the issue it is how you define the `IdClass`
>
> for such a case
>
> ```
> @Entity
> @IdClass(PK.class)
> public static class NodeS {
>
> @Id
> @GeneratedValue(strategy = GenerationType.SEQUENCE)
> private Long nid;
>
> @Id
> @ManyToOne
> private HeadS hid;
> ...
> }
> ```
>
> the class has to be
>
> ```
> class PK implements Serializable {
>
> private Long nid;
>
> private HeadS hid;
>
> public PK(Long nid, HeadS hid) {
> this.nid = nid;
> this.hid = hid;
> }
> ...
> }
> ```
JPA 2 spec 2.4.1.3 Examples of Derived Identities,
Case (a): The dependent entity uses IdClass to represent a composite key:
```
public class DependentId {
String name; // matches name of @Id attribute
long emp; // matches name of @Id attribute and type of Employee PK
}
@Entity
@IdClass(DependentId.class)
public class Dependent {
@Id String name;
// id attribute mapped by join column default
@Id @ManyToOne Employee emp;
...
}
```
HeadS is the Entity type and its Id type is Long.
I backed out the changes to SimpleValue.java/AbstractEntityTuplizer.java and changed the IdClasses to match and it does pass the tests in Hibernate.
But when testing 2.4.1.3, case a without the patch the following tests fails:
- testCompositePkWithIdentityAndFKByAuto: No part of a composite identifier may be null
- testCompositePkWithIdentityAndFKByAuto2: No part of a composite identifier may be null
- testCompositePkWithIdentityAndFKBySequence: No part of a composite identifier may be null
- testCompositePkWithIdentityAndFKBySequence2: No part of a composite identifier may be null
- testCompositePkWithIdentityAndFKByTable: No part of a composite identifier may be null
- testCompositePkWithIdentityAndFKByTable2: No part of a composite identifier may be null
These tests are expected to fail / ignored:
- testCompositePkWithIdentityAndFKByIdentity: No part of a composite identifier may be null
- testCompositePkWithIdentityAndFKByIdentity2: skipped
-Jason
—
You are receiving this because you were mentioned.
Reply to this email directly, https://github.com/hibernate/hibernate-orm/pull/3368#issuecomment-618352419, or https://github.com/notifications/unsubscribe-auth/AAQUDIQWBZ5E4INWC5ELIZ3....
5 years, 8 months