>
> In BasePeer.createQueryString() information about the foreign keys is used
> to create simple joins if necessary. This is doable. In
> BasePeer.doDelete() the isForeignKey() method is also called. It seems as
> if multiple deletes is done here, I'm not sure. Maybe somebody can shed
> some light on this method.
An attempt is made to delete references if the criteria specifies a
cascading delete. I wrote this but never used it (I generally like to make
it a bit more explicit what is happening.) I would not even have a problem
with removing the functionality if it interferes or is too complicated to
update. Should probably put it up to a vote, in the event it is being used
by someone.
>
> When the above mentioned changes are implemented Foreign Keys should be
ok.
>
> Primary Keys represent a whole new challenge altogether. The biggest
issue
> lies with IDBroker and BaseObject. These two classes relies on the fact
> that a table has *one* column that acts as the id.
BaseObject has an Object id so it should be very adaptable. But I do not
immediately know an adaptation that would be general. Most tables that have
multiple primary keys are join tables and are not candidates for business
objects.
It should be safe to say that IDBroker does not need to be updated to handle
multiple PKs. In the case of join tables the ids are known. In the event
of legacy system, you are probably going to be using db specific id
generation.
>
> I don't really have any ideas of how we would implement this. As far as
I'm
> concerned we just let users know that we require each table to have one
> column designated as the id column. This is good db design anyway.
>
> If we go for the above changes should we maybe consider moving to
something
> like Peer version 2. Could be an excuse for a nice clean break to JDBC2
as
> well. Just a thought - any comments suggestions?
>
Sounds like quite an undertaking. But unless someone wants to rewrite
Village for JDBC2, we will eventually need to do it. I would say try to
stick with JDBC1 as much as possible while supporting the new Types. If we
are ever going to have a release, this might be something we hold off on.
John
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]