Runtime DB mapping to class/objects?
Say someone requests the possibility of mapping DB tables to instances in a user interface开发者_JAVA百科. How could this be handled and what form could the domain take?
Example requested by David:
DB
Person
- FirstName
- LastName
- Age
- ...
In Java GUI
- Entity Identifier: Person
- Source table: Person
- Attribute identifier: firstName
- Source column: FirstName
- ...
[Accept button] => activate mapping/create instances
P.S: Doing things this way is probably more trouble than it's worth. I'm open to ideas.
精彩评论