Multiple fields referring to the same message

6 views
Skip to first unread message

debackerl

unread,
Jul 8, 2008, 12:28:36 PM7/8/08
to Protocol Buffers
Hi,

Is it possible to references a single message from multiple fields?
Let's suppose that we want to transfer all billing of a company, the
'bill' message would contain a 'customer' field. However, multiple
bills will have the same customer, will the customer be shared
automatically (i.e. only transferred once) or do I have to use unique
IDs instead?

Regards,
Laurent Debacker.

Hein

unread,
Jul 8, 2008, 1:12:42 PM7/8/08
to Protocol Buffers
You will have to design ids on a higher level instead -- foreign keys
etc. are beyond the scope of protocol buffers.

-Hein

Kenton Varda

unread,
Jul 8, 2008, 2:13:52 PM7/8/08
to debackerl, Protocol Buffers
2008/7/8 debackerl <deba...@gmail.com>:

Sorry, you'll need to use IDs or indexes of some sort, as Protocol Buffers are trees, not graphs.
Reply all
Reply to author
Forward
0 new messages