1

we've been using breeze for a long time and now I'm trying to access an existing webapi controller with a breezesharp client. Our controller is using NHibernate for data access.
On FetchMetadata the application throws an object reference not set exception on that line(24)
_schema = json["schema"]; in CsdlMetadataProcessor.
If I look at our metadata there is no schema node.
Am i missing something? Is there a different configuration for NHibernate?

edit: I also tried to export my metadata and import it with ImportMetadata on the metadatastore but it throws another exception when creating the clr type...

Thanks

lnu
  • 1,404
  • 1
  • 9
  • 25

2 Answers2

2

Ok, this was a bug and will be fixed in the next version of breeze-sharp, out later this week.

Jay Traband
  • 17,053
  • 1
  • 23
  • 44
  • I pulled the latest version: now it breaks when creating clr types based on structuraltypes – lnu Jun 17 '14 at 09:52
  • What error are you getting? I cannot repro your issue, can you also try getting the latest breeze.server.net from GitHub. I will be creating Nuget packages for these later this week or early next. – Jay Traband Jun 18 '14 at 17:52
0

Ok,

it's my fault. The bug with the NHibernate metadata has been fixed but my entities doesn't inherit from BaseEntity. We are heavily using breeze with a SPA and I was happy to reuse my existing code with a .net client but deriving my model entities from the BaseEntity class of Breeze is not an option.

Would it be possible to use reflection.emit or Castle DynamicProxy to create proxies of the model on the fly? That way the model could stay without any inheritance.

Thanks

lnu
  • 1,404
  • 1
  • 9
  • 25