[teiid-issues] [JBoss JIRA] (TEIID-3040) MongoDB: Remove the IDREF fields for the FK fields

Ramesh Reddy (JIRA) issues at jboss.org
Wed Jul 30 09:20:29 EDT 2014


     [ https://issues.jboss.org/browse/TEIID-3040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramesh Reddy updated TEIID-3040:
--------------------------------

    Description: 
TEIID-2958 has been working towards removing the IDREF fields from embedded documents. I see no reason to represent FK in the parent table with IDREF either. This will make the document model representation simple and aligns with how a typical developer would design.

for ex: Currently we have

{code}
{
	"_id" : 1,
	"firstName" : "Ramesh",
	"lastName" : "Reddy",
	"email" : DBRef("EMail", "abc at abc.com"),
	"acct_id" : DBRef("Accounts", 1),
	"Accounts" : {
                "_id": 1,
		"Name" : "Wireless"
	},
	"EMail" : {
                 "_id": "abc at abc.com",
		"provider" : "Comcast"
	}
}
{code}

change to:
{code}
{
	"_id" : 1,
	"firstName" : "Ramesh",
	"lastName" : "Reddy",
	"email" :  "abc at abc.com",
	"acct_id" : 1,
	"Accounts" : {
		"Name" : "Wireless"
	},
	"EMail" : {
		"provider" : "Comcast"
	}
}
{code}


  was:
TEIID-2958 has been working towards removing the IDREF fields from embedded documents. I see no reason to represent FK in the parent table with IDREF either. This will make the document model representation simple and aligns with how a typical developer would design.

for ex: Currently we have

{code}
{
	"_id" : 1,
	"firstName" : "Ramesh",
	"lastName" : "Reddy",
	"email" : DBRef("EMail", "abc at abc.com"),
	"acct_id" : DBRef("Accounts", 1),
	"Accounts" : {
		"Name" : "Wireless"
	},
	"EMail" : {
		"provider" : "Comcast"
	}
}
{code}

change to:
{code}
{
	"_id" : 1,
	"firstName" : "Ramesh",
	"lastName" : "Reddy",
	"email" :  "abc at abc.com",
	"acct_id" : 1,
	"Accounts" : {
		"Name" : "Wireless"
	},
	"EMail" : {
		"provider" : "Comcast"
	}
}
{code}




> MongoDB: Remove the IDREF fields for the FK fields
> --------------------------------------------------
>
>                 Key: TEIID-3040
>                 URL: https://issues.jboss.org/browse/TEIID-3040
>             Project: Teiid
>          Issue Type: Enhancement
>      Security Level: Public(Everyone can see) 
>            Reporter: Ramesh Reddy
>            Assignee: Ramesh Reddy
>             Fix For: 8.9
>
>
> TEIID-2958 has been working towards removing the IDREF fields from embedded documents. I see no reason to represent FK in the parent table with IDREF either. This will make the document model representation simple and aligns with how a typical developer would design.
> for ex: Currently we have
> {code}
> {
> 	"_id" : 1,
> 	"firstName" : "Ramesh",
> 	"lastName" : "Reddy",
> 	"email" : DBRef("EMail", "abc at abc.com"),
> 	"acct_id" : DBRef("Accounts", 1),
> 	"Accounts" : {
>                 "_id": 1,
> 		"Name" : "Wireless"
> 	},
> 	"EMail" : {
>                  "_id": "abc at abc.com",
> 		"provider" : "Comcast"
> 	}
> }
> {code}
> change to:
> {code}
> {
> 	"_id" : 1,
> 	"firstName" : "Ramesh",
> 	"lastName" : "Reddy",
> 	"email" :  "abc at abc.com",
> 	"acct_id" : 1,
> 	"Accounts" : {
> 		"Name" : "Wireless"
> 	},
> 	"EMail" : {
> 		"provider" : "Comcast"
> 	}
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the teiid-issues mailing list