375 Commits
Author SHA1 Message Date
Rob Bygrave 7163264cb1 [15x] Remove Inheritance support 2023-09-11 23:47:03 +12:00
Rob Bygrave 8a347fd773 [15x] Remove ElasticSearch support 2023-09-11 23:38:16 +12:00
Rob Bygrave 5f847ab283 [15x] Remove Draftable support 2023-09-11 23:37:18 +12:00
Rob Bygrave ff43672f4e Move source to Jakarta (use ./jakarta-to-javax.sh)
Moving the master branch to use jakarta based code and
dependencies. Change to use ./jakarta-to-javax.sh to convert
back to javax when releasing that.
2023-09-11 23:31:01 +12:00
Rob Bygrave 0ab0f9c569 Refactor internal SpiEbeanServer API - transaction from SpiQuery
Originally the API took explicit transactions but then the API changed
toward query.usingTransaction(), which means the SpiQuery holds the
explicit transaction.

This change is to update the SpiEbeanServer API to reflect that it can get
explicit transaction from SpiQuery.transaction() rather than pass transaction
around.

Doing this also identified a small bug where L2 cache could be hit when it should
not after there is some update on the transaction (hence the adjustment to the
test TestBeanCache missCount)
2023-08-25 23:15:51 +12:00
Rob Bygrave 56550a9534 #3166 Remove InTuples literal mode 2023-08-21 23:16:55 +12:00
Roland Praml dede93ca62 Use char-append instead of String-append 2023-08-21 08:22:18 +02:00
Rob Bygrave defb35b258 FIX for filterMany with raw expression with single SQL query
Fix for the case where the filterMany is not executed on a separate
query but instead part of the origin query.

The fix is to use the appropriate DeployParser and also fix the path
alias like ${} -> ${contacts}
2023-08-20 23:32:55 +12:00
Rob Bygrave 8a4024ecfc FIX for filterMany with raw expression with single SQL query
Fix for the case where the filterMany is not executed on a separate
query but instead part of the origin query.

The fix is to use the appropriate DeployParser and also fix the path
alias like ${} -> ${contacts}
2023-08-19 13:54:38 +12:00
Rob Bygrave 00e594d4fa Refactor prefer char append 2023-08-19 11:01:15 +12:00
Rob Bygrave 9d7754b92d Add support for literal mode for InTuples with lots of entries
So as to not exceed the limit on bind values, the InTuples expression can
go into literal mode where it uses literal values for supported types -
Numbers, Strings, UUID, and LocalDate.
2023-08-17 00:33:56 +12:00
Rob Bygrave 3e241907e6 Modify internal ImplicitReadOnlyTransaction to also support calling commit()
Originally, ImplicitReadOnlyTransaction was built to support read-only DataSource where the connections are using autoCommit true. This change modified ImplicitReadOnlyTransaction to also support use with the main DataSource where the connection are not using autoCommit true.

This is also now needed for the query.usingMaster() case where we have an implicit read only transaction but use the main DataSource with underlying connection requiring explicit commit() at the end of the transaction.
2023-07-03 21:27:58 +12:00
Rob Bygrave 2929483b0d Refactor ebean-core internal API - getters -> accessors 2023-06-01 22:05:53 +12:00
Rob Bygrave 06cad500c1 #3031 Improve error message 2023-05-10 00:34:27 +12:00
Rob Bygrave 31a0d9b6a6 Add test only - add PathStackTest 2023-04-06 15:03:14 +12:00
Rob BygraveandGitHub 1d09c0864d Merge pull request #3019 from ebean-orm/refactor/method-names-ObjectGraphOrigin
Refactor rename getters to accessors for ObjectGraphOrigin etc
2023-04-06 14:11:23 +12:00
Rob Bygrave c2777b0e27 Refactor rename getters to accessors for ObjectGraphOrigin etc 2023-03-30 23:58:22 +13:00
Rob Bygrave 79fd689e9a Add support for raw SQL SubQuery expressions IN,EQ,NE,GT,GE,LT,LE,EXISTS,Not IN, Not EXISTS
For these expressions the SQL SubQuery is not parsed by ebean and
just used as is.
2023-03-24 22:38:52 +13:00
Rob Bygrave a68665a37e Refactor rename methods on SpiExpressionRequest, DeployParser etc 2023-03-24 19:57:21 +13:00
Rob Bygrave 9ff240dc10 Refactor SpiExpressionRequest split parse() into property() and path() to have fast path
property() uses a fast path for the common case that the expression is a bean property path.
This will then fall back to using parse() when that isn't the case.
2023-03-24 19:35:11 +13:00
Rob Bygrave 9982fa3682 Refactor SpiExpressionRequest split append() into append() and parse()
- append() adds to the sql with NO parsing
- parse() adds to the sql with parsing to replace logical bean paths into table alias placeholder + db column
2023-03-24 17:37:34 +13:00
Rob Bygrave a8cad4f3d9 Change such that querybean generated class registration can be used will explicit class registration
In DatabaseConfig.isAutoLoadModuleInfo() it only used the querybean generated class registration is classes.isEmpty(). Changing this so that it only uses the loadModuleInfo flag.

This means, unless loadModuleInfo is set to false the classes that register with ebean will be a combination of both the explicitly registered ones plus the classes from the querybean generated EbeanEntityRegister.

In addition, this changes the classes from List to Set.
2023-03-10 11:01:46 +13:00
rob 34dc4375da Tidy existing given that lineNumber in SpiProfileLocationFactory always comes in as 0
The history behind this is that originally there was a "profileId" concept where that was a int value that could be used as an "id" for a transactional method that we wanted to profile.

That went away and then the idea was that bytecode enhancement would determine the line number and we would use that but that was a bad idea and we ended up with lineNumber always as 0.

These days with StackWalker and DProfileLocation we can do this better that way so yeah. A followup to this is to add to the api a boolean flag as to whether a profile location should be with line numbers (which can change frequently due to refactoring etc)
2023-02-22 15:22:58 +13:00
rob b0364f3c42 Use StackWalker for ProfileLocation and CallOrigin 2023-02-21 14:21:18 +13:00
Roland Praml 371f50fb4d NEW: ExpressionList has clear() method 2023-01-23 11:33:29 +01:00
Rob Bygrave f09cba3ab5 #2930 - Add extra test for DbOrderByTrimTest 2023-01-18 07:52:43 +13:00
Rob Bygrave 72f1ab18cc No effective change - rename parameter names only 2022-11-08 14:16:12 +13:00
Rob Bygrave 0a61852711 #2847 - Add support for Sub-query EQ, NE, LT, LE, GT, GE expressions 2022-11-03 00:22:48 +13:00
Roland Praml e2d75f4c2e FIX: Add fallback for Ebean 11 Jsons 2022-10-25 11:37:49 +02:00
Rob Bygrave e74e4ba532 Extract ebean-jackson-mapper module - rename ScalarTypeJsonObjectMapper to ScalarJsonJacksonMapper and move 2022-09-08 22:09:10 +12:00
Rob Bygrave 27beab2980 Refactor internal TypeManager change/improve its method names 2022-09-07 22:53:15 +12:00
Rob Bygrave 29e2b81092 #2813 - Sometimes subquery use wrong alias in SQL
The reason for this is that as part of DefaultOrmQuery.copy() it uses
DefaultExpressionList.copy() and that assumed that expressions were
safe to share which is NOT the case for IN and EXISTS sub-query expressions
so InQueryExpression and ExistsQueryExpression

The effective fix for this is that DefaultExpressionList.copy() changes
to call SpiExpression.copy() and for InQueryExpression and ExistsQueryExpression
to implement that copy() by creating a copy of the sub-query.

A "side-fix" is that in DefaultOrmQuery.createExtraJoinsToSupportManyWhereClause()
it was creating an instance of ManyWhereJoins, then mutating it ... and if we
change that to only doing the assignment at the end (object assignment is atomic)
then racy access reading ManyWhereJoins would always get a fully completed non-mutating
instance of ManyWhereJoins. Noting this because it kind of points to where I think
the race condition is (in createExtraJoinsToSupportManyWhereClause()) but noting that
with the change to DefaultExpressionList.copy() this "side-fix" isn't required per say.
2022-08-31 17:24:55 +12:00
Rob Bygrave 7ce85fe5f2 Refactor method names SpiJsonReader and DocStore types 2022-08-27 20:09:27 +12:00
Rob Bygrave b7e62df371 Refactor extract ebean-joda-time module - move joda ScalarTypes
Moves the joda-time ScalarTypes into a new ebean-joda-time module. Include
the ebean-joda-time module in the classpath, and the extra types will be
service loaded (by DefaultTypeManager).
2022-08-26 17:32:31 +12:00
Rob Bygrave 9984b53070 Refactor move BasicTypeConverter to ebean-core-type module
Doing this in preparation for moving the joda-type ScalarTypes into their own module
2022-08-26 15:21:30 +12:00
Rob Bygrave 4c13a3a779 Refactor move package - server.type.DataBind to server.bind, server.text.json -> server.json
The DataBind classes don't need to be in with server.type anymore.
The server.text.json package can just reduce package nesting.
2022-08-26 14:51:19 +12:00
Rob Bygrave a13f581a65 Refactor ScalarTypeBaseDateTime, merge into ScalarTypeUtils both IsoJsonDateTimeParser and DecimalUtils
That is, merge the static util methods into ScalarTypeUtils
2022-08-26 13:15:55 +12:00
Rob Bygrave f319ee66ad Refactor move ScalarTypeBaseDateTime to ebean-core-type module 2022-08-26 13:02:42 +12:00
Rob Bygrave 13a913428e DecimalUtils - remove unused methods converting between Instance and BigDecimal 2022-08-26 12:24:15 +12:00
Rob Bygrave c5e8b217e3 Refactor ScalarType, remove convertFromMillis() method (no longer needed)
Due to the move and change of CsvReader using StringParser ScalarType no longer
needs that general convertFromMillis() method. Note that date and dateTime ScalarTypes
still retain this conversion method.
2022-08-25 22:37:47 +12:00
Rob Bygrave 26f0605d72 Refactor ScalarType methods from getters to accessors 2022-08-25 12:25:38 +12:00
Rob Bygrave 10c9b2addd Remove ScalarType.isDateTimeCapable() ... (only used by CSV reader)
So the complexity cost doesn't justify itself against only being used
by CSV reader to validate when assigning a date/time format to a property
/ expression path.
2022-08-25 12:16:37 +12:00
Rob Bygrave c7bd6c8bde Support a naming convention function that can be applied to metrics names for reporting
For example, can apply a lower case underscore naming convention to the metrics names. This
can be done such that it doesn't have to be applied every time the metrics are collected and
reported.
2022-08-08 21:34:00 +12:00
Rob Bygrave 52e6c0c625 #2736 - findDto nonsupport setter chain (accessor style setters, both fluid style and non fluid style) 2022-07-05 10:37:55 +12:00
Rob Bygrave 745fbe883e #2737 - Mapping of TimeZone doesn't have enough characters 2022-07-05 09:05:13 +12:00
Rob Bygrave fa6fdf124d Fix test BasicProfileLocationTest 2022-06-16 13:52:27 +12:00
Rob Bygrave 5be3b7717c #2716 - Refactor ScalarType interface to make use of default methods 2022-06-13 22:38:15 +12:00
Rob Bygrave 4f3c9adf6f #2695 - DDL Generation for @UniqueConstraint ignores the name - should be the index name when given 2022-05-16 22:06:14 +12:00
Rob BygraveandGitHub ebbef86def Merge pull request #2626 from ebean-orm/wip/EntityBeanIntercept-interface
Support EntityBeanIntercept as an interface with InterceptReadWrite and InterceptReadOnly options
2022-05-03 14:15:49 +12:00
Rob Bygrave d1b5400f2c Merge branch 'master' into wip/EntityBeanIntercept-interface 2022-05-03 10:45:45 +12:00