db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henning P. Schmiedehausen" <...@intermeta.de>
Subject Re: my experience with torque
Date Tue, 24 Aug 2004 15:32:37 GMT
"Michael Moossen NO TENGO! ." <mmoossen@123mail.cl> writes:

> - id_broker seems to be a nice tool but it is restricted to single column pks... think
about a Invoice with pk (year, month, nr) where the nr has to be autoincremented but restarted
each month, my solution is prior to insert to select max(id) where year=.. and month=.. and
increment it, which can be generalised.

If you write code like this, you are already doomed. You should look
at the papers published by Scott Ambler at www.agiledata.org 

One of the key rules is: "Never assign meaning to primary
keys". Torque follows these rules and yes, we don't support ID
generation as you describe.

If this is legacy data: Tough. You can always write your own ID
generator und plug it into your schema.

If this is a newly designed DB: Redesign. Your design is bad.

>  Criteria has to be improved:
>- why to use two criterias for updates, just add this funcionallity to Criteria by some
set(column, value) methods and that is.
>- i think a criteria intention should be declared explicitly, via an abtract factory and/or
a enum like:
>  CriteriaFactory.getNewSelectCriteria()

Go ahead and present us with patches. This is, what open source software is all about. :-)

	Regards
		Henning


-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

"Fighting for one's political stand is an honorable action, but re-
 fusing to acknowledge that there might be weaknesses in one's
 position - in order to identify them so that they can be remedied -
 is a large enough problem with the Open Source movement that it
 deserves to be on this list of the top five problems."
                       -- Michelle Levesque, "Fundamental Issues with
                                    Open Source Software Development"

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message