Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a5f488b
Incremented version to 1.0.2
JanHolger Nov 6, 2021
e316723
Update pom.xml
JulianFun123 Nov 8, 2021
b2290a5
Added parent class support for models.
x7airworker Nov 29, 2021
1aabe50
Added test case for non-abstract parent
x7airworker Nov 29, 2021
d9c3c2e
Added support for n amount of super classes
x7airworker Nov 30, 2021
1cace0b
Splitted table and column analysis into two methods
x7airworker Dec 2, 2021
c939910
Merge pull request #31 from JavaWebStack/feature/parentClass
JanHolger Dec 2, 2021
d46558d
Order of analyzeColumns and analyzeTable was wrong
x7airworker Dec 2, 2021
a6880f7
Merge pull request #32 from JavaWebStack/feature/parentClass
JanHolger Dec 2, 2021
a954e80
Added a fork() method to the SQL interface and implemented a thread l…
JanHolger Feb 14, 2022
a798304
Merge remote-tracking branch 'origin/dev' into dev
JanHolger Feb 14, 2022
75d8596
Added grouping for the Accessible in order to improve security.
JanHolger Mar 21, 2022
804d8aa
Fixed issue with empty where in combination with the accessible
JanHolger Mar 21, 2022
abe4f8b
Fixed issue with empty where in combination with the accessible
JanHolger Mar 21, 2022
4ea3b03
Fixed #34 (refresh throwing exception) and optimized imports
JanHolger May 1, 2022
a63f495
Merge remote-tracking branch 'origin/dev' into dev
JanHolger May 1, 2022
1b1a25c
Implemented #36 (don't render empty groups)
JanHolger May 1, 2022
9d146e8
Implemented #35 (render empty IN as 1=2)
JanHolger May 1, 2022
ce66dbe
Updated abstract-data to 1.0.2
JanHolger May 1, 2022
cf52c50
Fixed create not using the session system
JanHolger May 18, 2022
9f73d83
Added hotfix for missing braces in DefaultMapper and added support fo…
JanHolger Aug 13, 2022
309e612
Fixed data type for abstract data json mapper
JanHolger Aug 19, 2022
a0a1548
Upgraded abstract-data
JanHolger Oct 7, 2022
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
Prev Previous commit
Next Next commit
Added test case for non-abstract parent
  • Loading branch information
x7airworker committed Nov 29, 2021
commit 1aabe508dc2c5035b2c766a4babe42464b756a6f
17 changes: 17 additions & 0 deletions src/test/java/org/javawebstack/orm/test/TableInfoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ public void testParentTableMigration () throws ORMConfigurationException {
assertEquals(fetchedChild.content, child.content);
}

@Test
public void testNonAbstractParent () throws ORMConfigurationException {
ORMConfig config = new ORMConfig()
.setDefaultSize(255);

assertThrows(ORMConfigurationException.class, () -> ORM.register(SecondChild.class, sql(), config), "The parent model has to be abstract!");
}

public static abstract class Parent extends Model {
@Column(ai = true, key = KeyType.PRIMARY)
Expand All @@ -48,4 +55,14 @@ public static class Child extends Parent {
@Column
public String content;
}

public static class NonAbstractParent extends Model {
@Column(ai = true, key = KeyType.PRIMARY)
public int id;
}

public static class SecondChild extends NonAbstractParent {
@Column
public String content;
}
}