Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERXCopyable #383

Merged
merged 3 commits into from
Feb 15, 2013
Merged

ERXCopyable #383

merged 3 commits into from
Feb 15, 2013

Conversation

avendasora
Copy link
Member

This is a modernized version of Chuck and Sacha's EOCopyable from Practical WebObjects. This version uses Java generics for type safety and can be completely controlled by UserInfo entries in the EOModel and with the addition of some EOGenerator template additions, eliminates writing any code in all but exceptional cases.

I also spent a lot of time trying to make the Javadoc as clear and helpful as possible.

public static <T extends ERXCopyable> NSArray<EOAttribute> exposedPKAndFKAttributes(T source) {
EOEntity entity = Utility.entity(source);
String entityName = entity.name();
if (Utility._exposedPKAndFKAttributeDictionary == null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't these accesses to the static variables be synchronized in some sort of way?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are absolutely correct. Fixed.

darkv added a commit that referenced this pull request Feb 15, 2013
@darkv darkv merged commit dd9548e into wocommunity:integration Feb 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants