37 Commits

Author SHA1 Message Date
Sanne Grinovero
af8b5b23b7 Make it an explicit requirement to have default constructors of entities 2020-02-10 15:08:56 +00:00
George Gastaldi
1f3c0aed80 Do not duplicate methods in Panache Entities 2020-02-01 08:05:24 -03:00
George Gastaldi
dfa2f3ad25 Do not duplicate methods in Panache Repositories
Fixes #6787
2020-02-01 08:05:24 -03:00
Stuart Douglas
b67491c1ff The big ClassLoader change
This changes the way Quarkus ClassLoading works,
to allow for isolated class loaders.

It also unifies how Quarkus is launched, so every
different mode we support uses the same mechanism
for both curation and launch.

Tests are now run in an isolated ClassLoader, which
means that a proxy is created that runs the tests
from within the isolated ClassLoader. This currently
has a quirk where @BeforeAll methods are run twice,
which will be fixed in the next JUnit release. This
can be worked around by using @QuarkusBeforeAll.
2020-01-22 13:30:44 +01:00
Sanne Grinovero
17e75d2b50 Fix the Panache / Hibernate ORM tests to not rely on automatic association management 2020-01-15 22:01:21 +00:00
Andrew Guibert
c53a9a9244 Support annotations with nested annotation arrays 2019-12-16 17:23:28 -06:00
Andrew Guibert
892a8845c0 Transfer JAX-B annotations from fields to accessor
For Panache entity enhancement we add @XmlTransient to the original fields
to force Jackson to use the generated accessor methods. However, this can
cause conflicts if the field was originally annotated with JAX-B annotations
that are mutually exclusive with @XmlTransient.

Signed-off-by: Andrew Guibert <andy.guibert@gmail.com>
2019-12-16 11:34:00 -06:00
Stéphane Épardaud
53d3886a17 Fix #5885: generics break panache repo enhancer
Do not enhance generic/abstract repos
Use proper generics resolution when looking up the repository type
arguments
2019-12-16 11:22:30 +01:00
Vinicius Ferraz
581f32e087 PanacheEntityBase update entities method 2019-12-05 12:31:46 -03:00
Stéphane Épardaud
f87febc421 Merge pull request #5616 from loicmathieu/panache/optionally-find
Provides Optional support inside Hibernate with Panache and MongoDB with Panache
2019-12-02 15:01:12 +01:00
Loïc Mathieu
aa9fc9582e feat: query hint 2019-11-29 17:32:16 +01:00
Loïc Mathieu
26331d2b5a Provides Optional support on Hibernate with Panache 2019-11-25 11:51:49 +01:00
Stéphane Épardaud
92669f2aef Merge pull request #5421 from the-bug/master
*persistant*-attribute of a panache entity should not be generated when using jackson
2019-11-20 18:57:14 +01:00
Loïc Mathieu
0cc5530b52 feat: lockmodetype 2019-11-19 12:14:50 +01:00
Jonas Scholz
07aeae2b11 isPersistent is ignored from Jackson
Jackson did use the isPersistent() method to generate a 'persistent'
attribute in the JSON-body. This attribute has no meaning for clients
consuming this JSON-object.
With the annotation @JsonIgnore the attribute is not generated anymore.
2019-11-15 19:18:42 +01:00
Stéphane Épardaud
ffdb0b5a82 Fix for 5274 (#5276)
* Panache: do not create findById bridge for abstract entity repositories

If the entity type is not fixed in the hierarchy yet, don't generate the bridge

Fix #5274

* Test for #5274: duplicate findById for abstract repositories

* Fix #5274 for Mongo too

* Test for #5274 for Mongo
2019-11-07 18:45:41 -03:00
Gwenneg Lepage
847e0570af Rename @SubstrateTest to @NativeImageTest 2019-10-29 21:48:29 +01:00
Gwenneg Lepage
5257fd855f Rename Substrate* build items to NativeImage* 2019-10-29 09:50:14 +01:00
Manyanda Chitimbo
b57a72fd80 fix(panache): do not throw NPE when retrieving PanacheRepository entity type
correctly retrieve entity type even if a custom PanacheRepository does not directly implement
PanacheRepository/PanacheRepositoryBase interfaces

Fixes #3644
2019-08-28 00:26:20 +02:00
Loïc Mathieu
90830d47a9 feat: IT for flush with Panache
Add integration test for persistAndFliush methods on both PanacheEntity and PanacheRepository.
2019-06-24 17:33:04 +02:00
Stuart Douglas
c9cba824e8 Remove license headers 2019-06-14 08:01:18 +10:00
Manyanda Chitimbo
85584b9202 refactor: minor cleanups to remove unused imports 2019-05-23 08:32:09 +02:00
Manyanda Chitimbo
bf7a86480d feat(#2518): add a default toString() implementation for PanacheEntities 2019-05-21 21:24:42 +02:00
Stephane Epardaud
073275d5ea Fix #1701: mark isPersistent() method transient
for isTransient():
- hibernate does not care, since it the class is not annotated
- jaxb ignores it since it has no setter
- for jsonb added @JsonbTransient and optional dep to jsonb

for mapped public fields:
- for jaxb: add the @XmlTransient annotation to the field to make it use the accessors
- for jsonb: nothing needed since it will ignore it and use the accessors
2019-04-16 11:52:56 +02:00
Guillaume Smet
db7b24956c Merge pull request #1901 from rsvoboda/io.quarkus.it
io.quarkus.it packages prefix unification for integration-tests module
2019-04-10 10:34:29 +02:00
Manyanda Chitimbo
778d21725c fix typo of min-size/max-size datasource properties in integration tests config. 2019-04-06 13:52:41 +02:00
Rostislav Svoboda
788a18a367 io.quarkus.it packages prefix for integration-tests module 2019-04-06 12:43:48 +02:00
Manyanda Chitimbo
c018116154 fixes Jandex index is not complete, missing: java.lang.Comparable #1580 2019-04-04 11:30:35 +02:00
Guillaume Smet
374b1fc385 Format the enums with one value per line 2019-04-02 17:06:47 +02:00
Stuart Douglas
2a3e3c6993 Merge pull request #1692 from FroMage/1367
Test for #1367
2019-03-29 23:35:39 +11:00
Stephane Epardaud
39753d43ad Disable test for #1367 on substrate because it cannot work there 2019-03-29 11:50:18 +01:00
Stephane Epardaud
f4a0cd9d78 Test for #1367 2019-03-29 11:50:17 +01:00
Stephane Epardaud
6e3421993e Panache test: remove test code that is now unnecessary due to better lazy tracking 2019-03-26 11:02:52 +01:00
Stephane Epardaud
2ddadd8d87 Test for #1376 2019-03-26 11:02:16 +01:00
Stephane Epardaud
e68768b515 Turns out Hibernate does sometimes require a default constructor 2019-03-26 11:01:47 +01:00
Guillaume Smet
36fe421782 Finalize the migration to application.properties
Fixes #1224
2019-03-08 17:28:59 +01:00
Guillaume Smet
47e72dd967 Rename panache-jpa to hibernate-orm-panache 2019-03-06 12:58:42 +01:00