RE: [PEAR] NextID and DB_DataObjects (me too;)
| From: | LIMBOURG Arnaud | Date: | Fri, 22 Nov 2002 10:02:25 +0000 |
| Subject: | RE: [PEAR] NextID and DB_DataObjects (me too;) | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-2806@lists.php.net to get a copy of this message | ||
The only problem with that is when you want to have your own id, like
DATE-SEQUENCE-INCREMENT.
You then have no choice but to override insert or do your own piece of code
and tell dataobject the id ;)
> try changing the line in insert as below..
> I guess it should be user defined somehow.. if you can come up with a
> patch that does that feel free to commit it.
>
>
>
> if (($key = @$keys[0]) && ($dbtype != 'mysql')) {
>
> $this->$key = $__DB->nextId($this->__table.'_seq');
> }
>
>
> Of the top of my head
> [DB_DataObject]
>
> seq_tablename = sequencename
>
> may be a good format.. - if it exists use the value,
> otherwise use tablename_seq
>
> Regards
> Alan
>
>
>
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>