The manual says that you can create a record as such:
However when I do this I get the following exception:
The sample code implements a constructor that takes session which does work:
Has this changed in the 4.4 beta since the manual was written? What am I doing wrong? Do I have to implement this constructor in all my classes? |
As far as I have grasped this, you either have to implement such a constructor for entities that passes the session object to the base constructor or you have to utilize automatic session activation - like this:
Thanks, Sebastian, you are absolutely right. The only thing I could add is that it might be more convenient to make use of Session Profiles (Client, Server & Legacy ones). A Session Profile notion represents a set of predefined Session Options and is introduced in 4.4 Beta 1. More information on the subject can be found in Release Notes. I am using 4.4 Beta 1 and I hadn't read the release notes. Thanks for answering the question so quickly. Just a few more questions:
1
Hope that helps. |