Announcement Announcement Module
No announcement yet.
@Transient field not set when set object from class Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • @Transient field not set when set object from class

    hi all
    I have 2 table with one to many relation in database and classes for those for example A and B.

    and I need a field in class A that return first relative B for example firstresult

    PHP Code:
        B firstresult
    B getFirstresult() {
    void setFirstresult(B firstresult) {
    this.firstresult firstresult;
    and set this firstresult in this method in class A
    PHP Code:
    public String B() {
            for (
    B iterable_element bs) {
                if (
    this.firstresult iterable_element;
    when I get list from dao and show in xhtml this firstresult has true value ,but when select item A from datatable and write in console this firstresult is null ,
    whats happens?
    Last edited by anisa; May 5th, 2013, 02:18 AM.