Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix jakartaee/persistence#637, TCK should not set version on entity manully #1325

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2023 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -266,8 +266,8 @@ public void createIntTestData() {
getEntityTransaction().begin();
getEntityManager().persist(new Int_Field("1"));
getEntityManager().persist(new Int_Property("2"));
getEntityManager().persist(new Integer_Field("3", new Integer(0)));
getEntityManager().persist(new Integer_Property("4", new Integer(0)));
getEntityManager().persist(new Integer_Field("3"));
getEntityManager().persist(new Integer_Property("4"));

getEntityTransaction().commit();
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2023 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -264,8 +264,8 @@ public void createShortTestData() {
getEntityTransaction().begin();
getEntityManager().persist(new Short_Field("1"));
getEntityManager().persist(new Short_Property("2"));
getEntityManager().persist(new ShortClass_Field("3", new Short((short) 0)));
getEntityManager().persist(new ShortClass_Property("4", new Short((short) 0)));
getEntityManager().persist(new ShortClass_Field("3"));
getEntityManager().persist(new ShortClass_Property("4"));
getEntityTransaction().commit();
} catch (Exception e) {
logger.log(Logger.Level.ERROR, "Unexpected Exception in createShortTestData:", e);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2023 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -264,8 +264,8 @@ public void createLongTestData() {
getEntityTransaction().begin();
getEntityManager().persist(new Long_Field("1"));
getEntityManager().persist(new Long_Property("2"));
getEntityManager().persist(new LongClass_Field("3", new Long(0)));
getEntityManager().persist(new LongClass_Property("4", new Long(0)));
getEntityManager().persist(new LongClass_Field("3"));
getEntityManager().persist(new LongClass_Property("4"));
getEntityTransaction().commit();
} catch (Exception e) {
logger.log(Logger.Level.ERROR, "Unexpected Exception in createLongTestData:", e);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2023 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -175,9 +175,8 @@ public void createTimestampTestData() {

try {
getEntityTransaction().begin();
Timestamp currentTime = new Timestamp(new Date().getTime());
getEntityManager().persist(new Timestamp_Field("1", currentTime));
getEntityManager().persist(new Timestamp_Property("2", currentTime));
getEntityManager().persist(new Timestamp_Field("1"));
getEntityManager().persist(new Timestamp_Property("2"));
getEntityTransaction().commit();
} catch (Exception e) {
logger.log(Logger.Level.ERROR, "Unexpected Exception in createTimestampTestData:", e);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -45,12 +45,6 @@ public Integer_Field(String id) {
this.id = id;
}

public Integer_Field(String id, Integer basicInteger) {

this.id = id;
this.basicInteger = basicInteger;
}

public String getId() {
return id;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -39,12 +39,6 @@ public Integer_Property(String id) {
this.id = id;
}

public Integer_Property(String id, Integer basicInteger) {

this.id = id;
this.basicInteger = basicInteger;
}

@Id
public String getId() {
return id;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -50,12 +50,6 @@ public LongClass_Field(String id) {
this.id = id;
}

public LongClass_Field(String id, Long value) {

this.id = id;
this.basicLong = value;
}

public String getId() {
return id;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -44,12 +44,6 @@ public LongClass_Property(String id) {
this.id = id;
}

public LongClass_Property(String id, Long value) {

this.id = id;
this.basicLong = value;
}

@Id
public String getId() {
return id;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -50,12 +50,6 @@ public ShortClass_Field(String id) {
this.id = id;
}

public ShortClass_Field(String id, Short value) {

this.id = id;
this.basicShort = value;
}

public String getId() {
return id;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -44,12 +44,6 @@ public ShortClass_Property(String id) {
this.id = id;
}

public ShortClass_Property(String id, Short value) {

this.id = id;
this.basicShort = value;
}

@Id
public String getId() {
return id;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -47,12 +47,6 @@ public Timestamp_Field(String id) {
this.id = id;
}

public Timestamp_Field(String id, Timestamp basicTimestamp) {

this.id = id;
this.basicTimestamp = basicTimestamp;
}

public String getId() {
return id;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -41,12 +41,6 @@ public Timestamp_Property(String id) {
this.id = id;
}

public Timestamp_Property(String id, Timestamp basicTimestamp) {

this.id = id;
this.basicTimestamp = basicTimestamp;
}

@Id
public String getId() {
return id;
Expand Down