2

I have table HOSPITALS and ADDRESSES Where ADDRESS_ID is the foreign key . I am using simple.data to get all the details for the class Hospitals which has a Addresses object in it. I am having a query which is like

DB.HOSPITALS.All().Select(DB.HOSPITAL.ADDRESSES.POSTCODE); 

The Postcode is not getting mapped to the Address object propery. basically a problem with the mapping logic for nested object.

satish
  • 2,425
  • 3
  • 23
  • 40
  • possible duplicate of [Simple.data and Casting Logic](http://stackoverflow.com/questions/17674470/simple-data-and-casting-logic) – Dan Maharry Jul 17 '13 at 08:29
  • This appears to be the same question you asked yesterday? – Mark Rendle Jul 17 '13 at 09:28
  • Ya but this time i am trying to use Select .. It is not casting to the Nested object – satish Jul 17 '13 at 09:56
  • Then use the same advice given yesterday - try `List hospitals = db.Hospitals.All().With(db.Hospitals.Addresses.As("Address"));` to wrap it into your POCO – Dan Maharry Jul 17 '13 at 12:05
  • For With () Keyword i am identifier too long as a error in oracle DB . So i cannot use With really. May be dot notation cast will be a solution. please advice – satish Jul 17 '13 at 12:18

0 Answers0