topic_content stuff was intended for translations. This means, that
under no conditions
should UI be concerned with IDs from that table. Instead, the way to
deal with it will be
through topic_id+language combinations (which is, incidentally, how
access control to
translations should work). Let's have Belkman and Sergey think through
process in detail, and send proposal here, before trying to implement
this again, so that
we don't have to re-do it ;-)
> Here is the part of our discussion on IRC regarding returning 2 values
> from stored procedure issue:
> HappySquirrel> sergey, I was trying to implement your idea about returning
> more than one value from topic_create
> <HappySquirrel> At this moment, I don't think it's a good idea
> <HappySquirrel> 1) It instantly breaks any code using topic_create()
> <HappySquirrel> 2) It makes it harder to work with topic_create(), and
> makes it an exception of everything else we have
> <HappySquirrel> I admit, though, that my workaround isn't perfect
> <HappySquirrel> (that is - to call a select after topic_create()).
> <HappySquirrel> however, I can make a special proc,
> <HappySquirrel> topic_create_ext(), that would do it for you
> <HappySquirrel> (if you insist)
> My concern is that we are going to have the same issue at the creation of
> every UMO in the application - we'll need UMO_id and UMO_content_id every
> time, so I'd like to ask everyone's opinion on this subject.
>> It is possible to return a structure from stored proc. Unfortunately, ODBC
>> has no support for this. I'd try to return two values, but it would take
>> some time.
>> 2007/4/25, email@example.com <firstname.lastname@example.org>:
>>> When I modify topic I have to deal with topic_content_id, so I need to
>>> this value on topic creation.
>>> Currently my Topic::create() returns topic_id(b/c topic_create() returns
>>> topic_id). I'd like to avoid running the additional query to get
>>> topic_content_id by topic_id.
>>> Is it possible to return structures from stored procedure? Any ideas how
>>> should deal with this?
>> Alexey Parshin,
Ilya A. Volynets-Evenbakh
Total Knowledge. CTO
Authoright © Total Knowledge: 2001-2008