Michael Bayne
f0f722ab7c
Ignore @Transient annotated fields when generating persistent field constants.
2007-09-17 18:23:40 +00:00
Michael Bayne
b2a3cd0f9a
Wrapped long lines.
2007-09-10 20:44:11 +00:00
Par Winzell
45a03ed42d
Let's note what we're doing here.
2007-08-27 16:22:46 +00:00
Par Winzell
8081e7bfad
Fall back to the simple case: a query on a concrete record without overrides can be stripped of all JOINs and external WHERE clauses in the second pass.
2007-08-27 16:11:26 +00:00
Par Winzell
8e9279c242
We can't replace the original WHERE clause while keeping the original JOINs. Unfortunately, figuring out precisely which JOINs may be safely deleted seems rather complicated. For now, trust the database to do the right thing when our second-pass query is identical to the first one, except with an additional WHERE condition that restricts the primary key columns according to the results of the first pass.
2007-08-24 16:22:27 +00:00
Michael Bayne
d80cccd6bf
I'm assuming it's valid for a CachedValue to exist but have a null value as we
...
properly ignore those elsewhere, so we should ignore them when traversing the
cache as well.
2007-08-24 01:46:40 +00:00
Michael Bayne
b24786facd
More useful debug information.
2007-08-24 01:13:27 +00:00
Michael Bayne
cd6410ad7d
Let's not stick a fork in things if we don't have to. This is rendering Whirled
...
inoperable right now, but just returning what we got would be perfectly fine.
2007-08-24 01:07:45 +00:00
Par Winzell
be3649908b
Replace insane implementation with one that does not rely on the database to magically know in which order we want results returned.
2007-08-22 20:30:20 +00:00
Michael Bayne
fa316d40d1
2007-08-22 18:19:40 +00:00
Michael Bayne
d652140afb
shadowOf is never null, rather it is the default value (PersistentRecord.class)
...
which we should studiously ignore.
2007-08-22 18:03:44 +00:00
Par Winzell
97fed4e7d9
Yet another attempt at glorious audacity, after the realization that different kinds of clauses really do need to handle overrides differently. This should re-enable cache-friendly collection queries even on clones, which are the most complex things we do.
2007-08-22 17:44:06 +00:00
Par Winzell
78f6ae51fd
Automatically bring any shadowOf class into play without an explicit FromOverride clause. This needs some more thought.
2007-08-22 17:40:48 +00:00
Par Winzell
b1cdca0595
Even in load() we can be without a where clause, for e.g. loading a count(*) style record.
2007-08-22 17:18:15 +00:00
Par Winzell
470c56d38c
If we declare an entity-level @Computed(shadowOf=...) then use that class as the default FROM table, duh.
2007-08-22 05:55:57 +00:00
Michael Bayne
a6f5211db4
Hack in a default value for integer types so that Postgres doesn't freak out
...
when we add a new non-null integer column. Maybe we should just specify default
values for all our integer columns, but decades of programming history point
toward zero as a pretty sensible default.
2007-08-22 02:40:44 +00:00
Par Winzell
5191c6d967
Break a much gentler FieldDefinition out of FieldOverride. The former *must* be supplied for any computed field; the latter must *only* be supplied for fields that would otherwise reference concrete columns. This lets us be more intelligent about what we expand where. Also bring back the old semi-conservative selection criterion for two-pass cache-happy collection queries; it gets simply too hairy when parts of an object's primary key comes from a separate table.
2007-08-21 23:11:14 +00:00
Par Winzell
3e96fb1d9a
Turn off field overrides when evaluating a join condition. This is all getting hairy -- sometimes you want FooRecord.BAR_C to point to the field 'under' the override, sometimes you want the actual overide expression. Hrm. Michael feels we probably shouldn't do any field expansion magic past the FROM clause. I am hoping we can preserve some of it in some intuitive way. This is a stop gap measure.
2007-08-21 19:06:55 +00:00
Par Winzell
0cb937b14b
2007-08-21 15:07:07 +00:00
Par Winzell
8e446fe93f
Generalize the automatic key value generation code so that it works on any column, and on any number of columns within a record.
2007-08-21 15:02:12 +00:00
Par Winzell
60d63b13f1
Let's explain that a bit more hands-on
2007-08-20 18:54:40 +00:00
Par Winzell
180b663b73
Fully respect the complexities of persistent records whenever we expand field references in a query. For example, a WHERE clause that operates on a field that's been overridden will correctly use the override. This is much more complicated than what we had before (which was fundamentally broken in its own way) so this patch could introduce strange behaviour. Please be on the lookout for SQL errors in your logs and/or data fields showing unexpected values.
2007-08-20 18:35:43 +00:00
Par Winzell
6a608fcd6e
Roll back 2192 with comment.
2007-08-17 22:24:37 +00:00
Par Winzell
fb259504c9
2007-08-16 20:26:12 +00:00
Par Winzell
a794805a86
Another place where it's safest to be explicit about whence the column comes.
2007-08-16 20:24:15 +00:00
Par Winzell
94766648e6
We have to carefully convert the user's query input to the boolean lexeme language TO_TSQUERY() expects. We may ultimately have to do more complicated things here, too.
2007-08-16 16:54:52 +00:00
Par Winzell
cf8a977778
Add the primary key on columns, not fields.
2007-08-15 22:18:54 +00:00
Michael Bayne
d414292ac3
Let's not force validation on every Tom, Dick and Harry. This is a little
...
verbose, so maybe I'll change my mind again later and do something yet again
different.
2007-08-15 19:47:16 +00:00
Michael Bayne
a68a6534a4
More sanity checking.
2007-08-15 19:03:47 +00:00
Michael Bayne
0175081c54
2007-08-15 19:00:50 +00:00
Michael Bayne
8e13453362
Added some sanity checks to notice and catch programmer errors as early as
...
possible.
2007-08-15 18:44:35 +00:00
Michael Bayne
b884f89e80
If a persistent record is abstract, do not generate ColumnExp() constants for
...
it; if it extends another record, generate ColumnExp() constants for persistent
fields inherited from its parents.
2007-08-15 02:39:42 +00:00
Michael Bayne
a13756eec3
Make sure the record in question is not computed.
2007-08-15 01:16:02 +00:00
Michael Bayne
ab8ee79dbe
The logging output already contains the enclosing method name. So instead of
...
repeating the method name:
2007/08/14 16:07:52:157 INFO PersistenceContext.cacheStore: cacheStore: entry [key=...
we'll just say what we're doing:
2007/08/14 16:07:52:157 INFO PersistenceContext.cacheStore: storing [key=...
2007-08-14 23:18:22 +00:00
Michael Bayne
8e916489e0
Brevify our toString() output so that cache debug logging is readable.
2007-08-14 23:15:08 +00:00
Michael Bayne
34d1e73976
Return the string value of our cached value as our own.
2007-08-14 23:12:53 +00:00
Michael Bayne
589045232c
Add a mechanism for warning about records that are lazily initialized after an
...
attempt has been made to resolve all registered records.
2007-08-14 21:35:38 +00:00
Michael Bayne
0b91f0f6a7
Use IllegalArgumentException since those are basically illegal arguments. Also
...
use @exception because it's a nice way to let humans and tools know what's
going on.
2007-08-14 18:47:21 +00:00
Michael Bayne
f9757c3633
"List to Array to List to Set" becomes "to Set".
2007-08-14 18:37:40 +00:00
Par Winzell
4b40140d2d
Tighten up a few places where we return null to callers who really never want to see nulls -- throw exceptions instead.
2007-08-14 17:40:00 +00:00
Par Winzell
79024ea85a
Add dialect-agnostic auto-migration of full text indexes.
2007-08-14 17:00:26 +00:00
Par Winzell
f80ce4d862
Log the creation of a full text search index on the MySQL side.
2007-08-14 16:09:23 +00:00
Par Winzell
e5bf0d9d97
Better comments explaining the hairiest bits of auto-migration.
2007-08-14 15:41:36 +00:00
Michael Bayne
9edfe28d33
Tidied up SQL execution in liaisons; fixed MySQL column renaming.
2007-08-14 01:11:09 +00:00
Par Winzell
3a99decfce
Rename @Index(columns) to @Index(fields) and do the proper translation to column name during table creation / migration.
2007-08-13 22:57:09 +00:00
Michael Bayne
632b8684be
Classes go after methods.
2007-08-13 21:59:25 +00:00
Michael Bayne
d72ad79705
Catch marshaller initialiation failure and report it more informatively.
2007-08-13 21:47:56 +00:00
Michael Bayne
f76ab3592a
More Zell changes:
...
- Re-read the table metadata after we run pre-default migrations, since those
are pretty much guaranteed to change the table.
- Changed EntityMigration.Rename to a pre-default rather than a post-default
migration.
- Made all the static EntityMigration subclasses use the generic liaison rather
than JDBCUtil.
2007-08-13 19:42:46 +00:00
Michael Bayne
f4dfccbf97
Patch from Zell to quell warnings about mismatched schemas for database-
...
specific auxiliary columns (specifically Postgres's FTS column).
2007-08-13 19:37:09 +00:00
Michael Bayne
9b87020fe5
Added getCacheAdapter().
2007-08-11 00:48:59 +00:00