The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
No Data shown through Relationship to Contact Entity
Posted: 10 Mar 10 4:52 AM
|
We've created a new entity in our project which doesn't have anything to do with the existing slx-entities. the datasets in the main entity get importet from another application. My form should direct a process to copy the adressinformation of that new entity into the existing datasets of the contactentity.
By the way, it is a upgrade from 6.2 to 7.5.2 web. In the lan client it was very easy. The developer took the slx_contactid from that new entity and joined it with the contactid from the contacttable. So he had a tab in the contact-area which was showing the data from my new entity that belong to the current contact. More contacs can be belong to one record of "NewEntity"
Web Client: In the AA I've build the new form with all the necessary controls. I created a relationship with NewEntity as parent and contact as child to have that 1:M relationship I need as descipted. In the NewEntity-Area I can see all the recors I want, stored in the contact table belonging to the current dataset. But in my new form for that copy process - ContactDetail as Main and that NewEntity-form as tab - I can't see any data, would say I have a texbox but it's emtpy.  |
|
|
|
Re: No Data shown through Relationship to Contact Entity
Posted: 10 Mar 10 5:31 AM
|
Not completely sure you have described this correctly - it sounds like you have a one to one tab off Contact (with a textbox) but are trying to show one-to-many data on that tab. This obviously will not show any data. You would need a datasrouce that points to your one to many relationship and a datagrid that points to that data source.
Let me know in a bit more detail for the "Web Client" description of steps you have taken. |
|
|
|
Re: No Data shown through Relationship to Contact Entity
Posted: 10 Mar 10 6:32 AM
|
Thx for your help.
NewEntity is One, Contact is Many. I try to show the NewEntity which is the parent as tab under his child Contact (hope you understand that). So there is exactly one NewEntity, for example "neA" which belongs to the Contact "c1". And there are more Contacs for that NewEntity "neA". So a datagrid is not that what i need. I already tried to use a datasource pointing to the relationship and tried to get the information for my textboxes from that datasource but that won't work, too.
I don't know really how I should describe what I have done, because this are my first steps in web customizing, but I try: Facing that OneToMany realationship I clicked in the Entitytree on NewEntity extended that tree to get to "Child Properties" and sayed "new Relation". I chose on the left side the slx_contacid. On the right side I navigated to Contact and chose the ContactID. Then I had a Relationship called "NewEntity(DisplayName).Contacts M:1 Contact.NewEntity(TableName)". I created a new Form for contact and insert some of the needed controls. The databindings are like MainEntity.NewEntity.Databasefield. All other databindings I did like that worked. But I get nothing out of that NewEntity. |
|
|
|
Re: No Data shown through Relationship to Contact Entity
Posted: 10 Mar 10 10:37 AM
|
OK I get you - you have a many to one.
Well I must say it sounds like everything is done correctly. One thing to check - are the Ids in the Id columns exectly the same case? I think NHibernate is case sensitive in joining...
For instance you have contact with an id of:
CXXXXXXXX1
And in your child entity you have:
Cxxxxxxxxx1
(note the lower case X's) I dont think it will join correctly. I might be wrong but I seem to recall having an issue like this some time ago... |
|
|
| |
|
Re: No Data shown through Relationship to Contact Entity
Posted: 11 Mar 10 6:19 AM
|
Originally posted by Sebastian Walter
Thx for your help.
NewEntity is One, Contact is Many. I try to show the NewEntity which is the parent as tab under his child Contact (hope you understand that). So there is exactly one NewEntity, for example "neA" which belongs to the Contact "c1". And there are more Contacs for that NewEntity "neA". So a datagrid is not that what i need. I already tried to use a datasource pointing to the relationship and tried to get the information for my textboxes from that datasource but that won't work, too.
I don't know really how I should describe what I have done, because this are my first steps in web customizing, but I try: Facing that OneToMany realationship I clicked in the Entitytree on NewEntity extended that tree to get to "Child Properties" and sayed "new Relation". I chose on the left side the slx_contacid. On the right side I navigated to Contact and chose the ContactID. Then I had a Relationship called "NewEntity(DisplayName).Contacts M:1 Contact.NewEntity(TableName)". I created a new Form for contact and insert some of the needed controls. The databindings are like MainEntity.NewEntity.Databasefield. All other databindings I did like that worked. But I get nothing out of that NewEntity. |
|
OK lets try and get to the bottom of this. You have(?):
A new Entity, called NewEntity. This is a many to one (we dont have one to one in 7.5 world) off of Contact going from NewEntity to Contact.
Visualised as NewEntity -->(many-one) Contact.
You have a new Contact form bound to Contact (as its a contact form you are adding), but you need to get to properties on NewEntity.
To bind your controls you are going from MainEntity (which is Contact as its a contact form) to NewEntity.Property.
So you can see you are actually traversing a one to many to get to your bind properties as you are going the other way from a many to one. (In theory going Contact --> (one-many) MainEntity).
This cannot work.
I think what you need to do is create a relationship from Contact to NewEntity, and make it a many to one. You should then be able to go through Contact ..> MainEntity.PROPERTY correctly.
Does that make sense? Or have I misunderstood your description?
Thanks, Nick |
|
|
| |
| |
| |
| |
| |
|