Smartobject keys not defined


Badge +2

I've made many smartobjects from the "SmartObject Service Tester" looking at a database. This all works fine except if you try and make any associations it claims that the smart object has no key defined. It does in the database and k2 designer wont let me check the "Key" as a key. 15651i714C8BC6C9BFAC00.png

Alas if I try and make any association It complains about the smartobject having no key. Am I missing something?


5 replies

Badge +2

Here is a picture of the error I can't get past. Both of the smartobject definately have keys. I am able to Create, Read, Update, Delete etc12222iACD9C388D81CFB46.png

Userlevel 5
Badge +18

There seems to be two Smartobjects:


 


1.  [Test].[dbo].[Profiles]


2.  [Test].[dbo].[Options]


 


Does the [Test].[dbo].[Profiles] smartobject have a key? 


 

Badge +2

Hi Tin, thanks for the reply. Yes both tables have primary keys. 

Userlevel 1
Badge +8

Hi Esmond

 

I think the problem here is that you are trying to create a many to many relationship, which requires a composite smartobject.  I believe this will only work if you are using SmartBox smartobjects, and K2 will actually create a composite smartobject table in the K2 database for you, which will have the 2 key fields from each table in it.

 

Is there a reason you want a many to many relationship? In most cases you would only have a many to one or one to one relationship.

 

 

Userlevel 3
Badge +9

I am facing the same issue. Has anybody got resolution?

Reply