"Michael Moossen NO TENGO! ." <[EMAIL PROTECTED]> 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
[EMAIL PROTECTED]        +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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to