> I would honestly like to try and keep SQL generation neutral.
> I'm not really liking the specifics being added to the schema
> directly for the Peer-based OM model. For example, would there
> not be a way to express the base class in a properties file?
> The same goes for the ID Broker additions.
Maybe I have forgotten something I added, but I think the IdMethod
attribute is useful outside the Peer/OM model, the values for the
attribute are idbroker,autoincrement,sequence and none. The last three
are fairly Turbine neutral and idbroker could be used independently of
the Peer/OM model. In the sql generation a table that is marked as
autoincrement should have its primary key column marked as
autoincrement. A table whose id method is identified as "sequence"
should contain a tag identifying the sequence table name (for Oracle at
least and I believe Postgres as well.) This can be used to generate the
sql to create the sequence. And "none" will be used for tables which
require no id generation regardless of what method is chosen for the
tables that do need id generation.
I know that these
> can be configured on a per table basis but does it happen
> very often that these options do not apply to all tables?
I think the normal case would be to use a combination of either
autoincrement/none, sequence/none, idbroker/none. And the possibility
of idbroker/sequence/none could also exist in the event that integration
of technologies is occuring for a couple tables in the schema for which
one of the technologies has limited capabilities as far as an idbroker
implementation goes, but other tables would benefit from the idbroker
implementation.
The only case I see that would be monolithic is if the problem requires
no many-many type relationships which would lead to join/relationship
tables. I suppose one might want to generate id's for a separate pk
column in a relationship table, though generally I think the pk is just
defined as a combination of the foreign keys.
> If this is not the case, then can we come up with some other
> way to express these preferences so that Torque that schema
> can be used in other applications besides Turbine?
The attributes and additional tags are optional. The default was set to
"idbroker" if not present, but as far as the sql generation goes this
could be left as it is currently and that means it does not affect the
sql generation. I was thinking it would be good for torque to generate
the ID_TABLE sql to populate its rows based on which tables specified
"idbroker" as its id method. That was one of my original reasons for
making "none" the default. But as long as it does not affect the sql
generation I don't think it hurts to leave "idbroker" as the default.
>
> jvz.
>
> ------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?: [EMAIL PROTECTED]
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]