RecId在Dynamics AX 2012中的通用表中是否唯一? [英] Are RecIds unique across Common tables in Dynamics AX 2012?

查看:78
本文介绍了RecId在Dynamics AX 2012中的通用表中是否唯一?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在AX 2012中,Common表中的RecId是否唯一?我读到这是取决于版本的,但是我没有找到关于AX 2012的任何信息.

Are the RecIds unique across Common tables in AX 2012? I read that this is version dependent, but I did not manage to find any information on this for AX 2012.

如果不是,这不会破坏AX中所有表从Common扩展的表的多态设计吗?然后Common声明RecId ...

If not, doesn't that break polymorphic design of the tables in AX, where all AX tables extend from Common? And Common declares RecId...

推荐答案

当Microsoft Dynamics AX将记录插入SQL表时,

When Microsoft Dynamics AX inserts records into SQL tables, a unique RecId is assigned to each record regardless of the company each record is associated with. The field is 64 bit long and unique per table.

在Axapta 3.0及更低版本中,每个公司帐户的RecId都是唯一的,且长度为32位.因此,一家公司最多只能有40亿条记录,因为RecId可能是负数.

In Axapta 3.0 and below RecIds were unique per company account and 32 bit long. Thus a company could have no more than 4 billion records as the RecId could be negative.

多态设计?在这种情况下,我不确定您的意思,但是给定一个RecId,您不知道它属于哪个表,因此您需要该信息才能找到记录:

Polymorphic design? I am not sure what you mean in this context, but given a RecId you do not know which table it belongs to, and you need that information in order to find the record:

public Common findRecord(TableId _tableId, RecId _recId) 
{
    Common record = new DictTable(_tableId).makeRecord();
    select record where record.RecId == _recId; 
    return record; 
}

在SQL中,没有表称为通用".这是一个AX概念,您可以将其视为仅包含方法的接口.

In SQL no table is called Common. It is an AX concept, you may consider it an interface containing methods only.

这篇关于RecId在Dynamics AX 2012中的通用表中是否唯一?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆