Dynamically fetch non-existent field on runtime

Posts   
 
    
User001
User
Posts: 4
Joined: 19-Nov-2024
# Posted on: 14-Mar-2025 03:11:42   

Hi people. Just like the previous thread found when I want to dynamically have non-existent property to the Entity. But now, I need to fetch "non-existent" field.

From what I found out, The PersistenceInfo was the main reason when fetching non-existent field. There, it has a Mapping to be initialized to tell the LLBL saying that this field belongs to the Entity. However, this non-existent field is not added into the mapping. So, I have manually put the mapping and it is OK to fetch. But the problem is there a public function to give access to add the Mapping? Hopefully, there is idea on how to do this.

Thank you.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39832
Joined: 17-Aug-2003
# Posted on: 14-Mar-2025 08:45:48   

We don't recommend doing this. The system isn't designed for this: the persistence info as well as the field info are readonly and shared among entities. Our system isn't designed to support dynamic mappings and dynamic entities at runtime.

Frans Bouma | Lead developer LLBLGen Pro