[Grok-dev] Re: Referencing objects by id

Gerard Petersen lijssies at gp-net.nl
Mon Aug 4 18:12:14 EDT 2008


Phillip,

Replies inline ...

> Sure, you can do that. However, you probably want these IDs to be unique 
> throughout a particular range, so the model would have to know about 
> existing IDs somehow. That typically means it needs to know at creation 
> time which container it's being added to.
I indeed want to use them unique (e.g. for invoice references, etc.) but also keep them unchangeable by the application user (me :-).

Being aware of what a grok.container actually is since this afternoon, I'll dig in some more before getting back n this.

> You want to assign a simple attribute:
> 
>      customer.id = new_id

Silly me. You're right. Thanx!

Kind regards,

Gerard.


More information about the Grok-dev mailing list