[Valentina][VSDK] M:M problems
Eric Forget
forgete at cafederic.com
Mon Jan 20 17:31:10 CST 2003
> on 1/20/03 11:08 PM, Eric Forget at forgete at cafederic.com wrote:
>
>> For the my class:
>>
>> class CGroupPerson : public VDK_BaseObject
>> {
>> public:
>> VDK_ObjectPtr mGroupPtr;
>> VDK_ObjectPtr mPersonPtr;
>> VDK_ULLONG mGP;
>>
>> public:
>> CGroupPerson ()
>> : VDK_BaseObject( "GroupPerson" ),
>> mGroupPtr( "GroupPtr", NULL, kFBL_CASCADE ),
>> mPersonPtr( "PersonPtr", NULL, kFBL_CASCADE )
>> mGP( "GP", fUnique )
>> {
>> // next call make field to be calculated
>> mGP.SetMethod( "some formula here" );
>> }
>> };
>>
>> I've tried all of these:
>>
>> mGP.SetMethod( "BitAnd( shiftleft(mGroupPtr,32), mPersonPtr" );
>> mGP.SetMethod( "BitAnd( shiftleft(mGroupPtr,32), mPersonPtr)" );
>> mGP.SetMethod( "BitAnd( shiftleft(GroupPtr,32), PersonPtr)" );
>>
>> Unfortunately, I cannot add more than 1 record (whatever the combinaison of
>> person and group). It always return error 344 (kFBL_FieldIsUnique). Any
>> idea?
>
> But that was juts example of idea!
Sorry.. ;-)
> I have ask look into SQL.pdf for correct names of functions,
> I just do not remember.
>
> Okay, I have look inside, and I see that we have made in Valentina
> << and >> operators
>
> So at least must be
>
> mGP.SetMethod( "BitAnd(mGroupPtr << 32), mPersonPtr" );
>
> And now we need find how correctly do bit AND ...
> Ops. I do not see function for this...
> Okay I need add them.
>
> But it seems you can simply use +
>
>
> mGP.SetMethod( "(mGroupPtr << 32) + mPersonPtr" );
Unfortunately, it still doesn't work. Are you sure it is the class member we
put there and not the column name? Sorry if it looks naïve, but I really
don't understand how it works...
Éric
___________________________________________________________________
Eric Forget Cafederic
ForgetE at cafederic.com <http://www.cafederic.com/>
Fingerprint <86D5 38F5 E1FD 5D9C 71C3 BAA3 797E 70A4 6210 C684>
More information about the Valentina
mailing list