mdb
b3d2950cc0
There's no - in there.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2249 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-10-31 22:55:31 +00:00
mdb
463d712dff
Bring this into line with libs-incl.xml. Eclipse users let me know if I've
...
broken anything.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2248 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-10-31 22:52:33 +00:00
mdb
685d9cfb8f
Provide a constructor that takes a collection.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2247 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-10-26 23:03:32 +00:00
mdb
db8d7f83a5
Use a slightly less generic name.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2246 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-10-26 00:56:01 +00:00
mdb
0ad39a5f7d
Some helpful files for Eclipse users.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2245 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-10-26 00:49:29 +00:00
mdb
6599842a6f
Imitation is the sincerest form of flattery.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2244 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-10-23 07:08:33 +00:00
mdb
f34b9dcf7f
Cleaned up some redundant casts and deprecated calls.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2243 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-10-23 00:15:37 +00:00
zell
3dedb868ea
I made a mistake originally allowing IDENTITY value generators some partial configuration (e.g. start value and increment value). This only ever worked on PostgreSQL, and so would cause completely different behaviour under MySQL. That's obviously a bad idea.
...
So, IdentityValueGenerator's init() was meant only to be called upon table creation, but in r2234 I began calling it in all of a table's generators after every auto-migration. Needless to say this was bloody stupid, and caused MemberRecord's primary key generator to reset in production just now.
My fix is not to revert r2234, however, but to explicitly state init()'s expected behaviour: it should certainly not reset a generator if it already exists, but only ensure that it's operational -- creating it only if necessary.
We now never reset an IDENTITY generator, ever. The whole point of them is, after all, that they're auto-created by the database.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2242 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-10-18 01:50:11 +00:00
mdb
7443ad7b67
Don't assign default values to columns that have a @GeneratedValue annotation
...
because those will have their values set at insertion time and the database
might rightly freak out about the inconsistency of saying that the field has a
constant default value.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2241 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-10-17 00:42:17 +00:00
mdb
c555c4280b
Nix the thread dumps, we've got everything mostly in hand.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2240 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-10-15 23:56:48 +00:00
zell
0648698b24
If the search begins with non-word characters, the array returned by join() will have as its first element. We don't want in the array. So lo, we remove it.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2239 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-10-15 18:33:21 +00:00
mdb
b602999a8b
Let's use a warning so we see this in the dev server logs.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2238 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-10-11 19:56:25 +00:00
mdb
09392a402d
Let's temporarily set up the bomb on anyone using the PrefsConfig on servers so
...
that we can track down these culprits and nix 'em.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2237 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-10-11 19:36:40 +00:00
zell
c0913656d3
I was the shadow of the waxwing slain.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2236 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-10-11 18:49:57 +00:00
zell
b319fd25be
Oops, haha, this could've been amusing.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2235 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-10-11 18:31:49 +00:00
zell
0bfeae4553
Match the changes in com.samskivert.jdbc.* by ridding ourselves of static column defining SQL strings. Also give ValueGenerators an option to calculate their initial value based on MAX() of the column for which values are being generated. As part of this we also make sure to initialize new ValueGenerators after all migrations take place, and add a way for them to clean up after themselves as well.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2234 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-10-11 18:14:49 +00:00
zell
1e50256ca2
Don't pass around and store column definitions as SQL strings, but introduce an object to contain that data. PostgreSQL's extensions does column alteration in individual tweaks, where MySQL just accepts a raw string and figures out what to do.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2233 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-10-11 18:12:37 +00:00
mdb
05b6eb6fd9
Add a default handleFailure() implementation like PersistingUnit.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2232 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-10-08 23:58:40 +00:00
mdb
08cbbc0b0f
Per Sarah: only strip the hostname if we have reason to believe we have a
...
hostname (foo.bar.com), prepend a "." to what appears to be a hostless domain
(bar.com), and don't call setDomain() at all if we don't have someting that
looks like a domain (localhost).
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2231 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-10-08 21:38:35 +00:00
mdb
df9f08d316
Per Mike T: we may want to create an array list of type B and then sort it
...
using a comparator on type A which is a superclass of B.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2230 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-10-08 15:17:34 +00:00
mdb
b43faf07ec
Fixed @Transient handling.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2229 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-09-27 16:57:05 +00:00
mdb
1eb87ed0f3
Let's not downgrade our databases.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2228 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-09-26 21:40:18 +00:00
mdb
dd9d9df690
Catch IOException when writing our response so that we don't freak out if the
...
client ungracefully stops listening to us.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2227 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-09-24 16:42:37 +00:00
mdb
e0d4d4302e
getFullTextIndex() is not expected to return null, so throw an informative
...
exception if it would rather than letting the caller NPE. Also switched to
the Zell-style single-letter studly _pClass.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2226 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-09-19 17:52:18 +00:00
zell
ada6b6d872
We need to look for FTI declarations in superclasses, too, just as we already do with @Entity indexes and @Table unique constraints. Ripped out the pointless RecordMetaData while I was at it. This is a lot cleaner.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2225 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-09-19 00:13:19 +00:00
zell
47c4d1cc12
Aii, indexes and triggers reside in the database-wide namespace and have to be qualified. I'll need to cook up migrations for the places where we already use FTS...
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2224 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-09-19 00:11:46 +00:00
mdb
aa8179542c
Added a standard traverse-and-filter cache invalidator.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2223 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-09-18 00:08:32 +00:00
samskivert@gmail.com
3aa217ffb7
Ignore @Transient annotated fields when generating persistent field constants.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2222 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-09-17 18:23:40 +00:00
mdb
bcd7f3df8d
Wrapped long lines.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2221 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-09-10 20:44:11 +00:00
andrzej
e45cd42c31
Added Charlie's adjustSize method.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2220 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-30 21:52:34 +00:00
landonf
1a2cd499ba
Need both junit4 and junit-3.7
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2219 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-29 21:50:11 +00:00
mdb
dc2ba271cf
Updated the README for external users of the library. Switched to junit4 and a
...
version agnostic servlet-api.jar.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2218 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-28 20:18:12 +00:00
zell
f2e59a1107
Let's note what we're doing here.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2217 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-27 16:22:46 +00:00
zell
85fe8b09c3
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.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2216 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-27 16:11:26 +00:00
zell
f7ee27230c
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.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2215 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-24 16:22:27 +00:00
mdb
968a0d8f02
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.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2214 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-24 01:46:40 +00:00
mdb
c672fb0184
More useful debug information.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2213 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-24 01:13:27 +00:00
mdb
f0be01f851
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.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2212 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-24 01:07:45 +00:00
zell
c61110e348
Replace insane implementation with one that does not rely on the database to magically know in which order we want results returned.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2211 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-22 20:30:20 +00:00
mdb
5a62ad7962
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2210 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-22 18:19:40 +00:00
mdb
6e232554c1
shadowOf is never null, rather it is the default value (PersistentRecord.class)
...
which we should studiously ignore.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2209 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-22 18:03:44 +00:00
zell
652a77cd4f
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.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2208 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-22 17:44:06 +00:00
zell
16302a71b9
Automatically bring any shadowOf class into play without an explicit FromOverride clause. This needs some more thought.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2207 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-22 17:40:48 +00:00
zell
5b22ae2d69
Even in load() we can be without a where clause, for e.g. loading a count(*) style record.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2206 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-22 17:18:15 +00:00
zell
3bc33872c5
If we declare an entity-level @Computed(shadowOf=...) then use that class as the default FROM table, duh.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2205 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-22 05:55:57 +00:00
mdb
0be54aa3ae
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.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2204 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-22 02:40:44 +00:00
mdb
ed88407fe9
Don't depend on MySQL TIMESTAMP column behavior.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2203 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-22 02:28:06 +00:00
zell
b97e3c20d3
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.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2202 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-21 23:11:14 +00:00
mdb
7434384261
Small formatting tweaks.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2201 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-21 21:40:31 +00:00
mdb
d31d988945
Note our transition before we apply it so that multiple processes don't run the
...
same transition and then all note that they ran it.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2200 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-21 21:39:28 +00:00